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

[Backport master] Fix dry-run #1039

Merged
merged 1 commit into from
Mar 3, 2023
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
10 changes: 7 additions & 3 deletions c2cciutils/scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ def main() -> None:
sys.exit(1)

if version_type is not None:
print(f"Create release type {version_type}: {version}")
if args.dry_run:
print(f"Create release type {version_type}: {version} (dry run)")
else:
print(f"Create release type {version_type}: {version}")

success = True
pypi_config = cast(
Expand Down Expand Up @@ -229,9 +232,10 @@ def main() -> None:
# Workaround sine we have the business plan
image_snyk = f"{image_conf['name']}_{tag_snyk}"

subprocess.run(["docker", "tag", image_source, image_snyk], check=True)
if not args.dry_run:
subprocess.run(["docker", "tag", image_source, image_snyk], check=True)
images_snyk.add(image_snyk)
if tag_snyk != tag_src:
if tag_snyk != tag_src and not args.dry_run:
subprocess.run(
[
"docker",
Expand Down