Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetDevVersion Is Triggering Oddly #14261

Merged
merged 3 commits into from
Oct 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions scripts/devops_tasks/build_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@
sys.path.append(tox_path)
from sanitize_setup import process_requires

def build_packages(targeted_packages, distribution_directory, is_dev_build = False):

def str_to_bool(input_string):
if isinstance(input_string, bool):
return input_string
elif input_string.lower() in ("true", "t", "1"):
return True
elif input_string.lower() in ("false", "f", "0"):
scbedd marked this conversation as resolved.
Show resolved Hide resolved
return False
else:
return False

def build_packages(targeted_packages, distribution_directory, is_dev_build=False):
# run the build and distribution
for package_root in targeted_packages:
print(package_root)
Expand Down Expand Up @@ -93,7 +104,6 @@ def verify_update_package_requirement(pkg_root):
),
)


args = parser.parse_args()

# We need to support both CI builds of everything and individual service
Expand All @@ -104,5 +114,9 @@ def verify_update_package_requirement(pkg_root):
else:
target_dir = root_dir

targeted_packages = process_glob_string(args.glob_string, target_dir, args.package_filter_string)
build_packages(targeted_packages, args.distribution_directory, bool(args.is_dev_build))
targeted_packages = process_glob_string(
args.glob_string, target_dir, args.package_filter_string
)
build_packages(
targeted_packages, args.distribution_directory, str_to_bool(args.is_dev_build)
)