Skip to content
Open
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
13 changes: 9 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ jobs:
type: string
steps:
- checkout
- run: pip install --user --upgrade setuptools twine wheel
- run: |
python setup.py sdist bdist_wheel
twine upload --repository-url <<parameters.registry_url>> --username <<parameters.username>> --password <<parameters.password>> --verbose dist/*
- when:
condition:
equal: [ master, << pipeline.git.branch >> ]
steps:
- run: pip install --user --upgrade setuptools twine wheel
- run: |
"$CIRCLE_BRANCH" == "master" && echo "Publishing to PyPI" || echo "Publishing to Cloudsmith"
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional echo statement on line 30 is unreachable code. Since the entire publish steps block is already wrapped in a condition that only executes when the branch equals 'master' (lines 24-27), this line will always echo 'Publishing to PyPI' and never reach the 'Publishing to Cloudsmith' case. Either remove this line or move it outside the when condition if different behavior is intended for non-master branches.

Suggested change
"$CIRCLE_BRANCH" == "master" && echo "Publishing to PyPI" || echo "Publishing to Cloudsmith"
echo "Publishing to PyPI"

Copilot uses AI. Check for mistakes.
python setup.py sdist bdist_wheel
twine upload --repository-url <<parameters.registry_url>> --username <<parameters.username>> --password <<parameters.password>> --verbose dist/*

orbs:
python: circleci/python@2.1.1
Expand Down