Skip to content

Commit

Permalink
Fix infinite version bump (#1794)
Browse files Browse the repository at this point in the history
* remove infinite loop, as well as exit early if version bump not needed

* rollback version
  • Loading branch information
samwinebrake authored Feb 19, 2025
1 parent e05ab33 commit 46f1fe7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,35 @@ jobs:
if [[ $file != brainscore_vision/benchmarks/* &&
$file != brainscore_vision/data/* &&
$file != brainscore_vision/metrics/* &&
$file != brainscore_vision/models/* ]]; then
$file != brainscore_vision/models/* &&
$file != pyproject.toml ]]; then
NEEDS_VERSION_BUMP=true
echo "Found change requiring version bump: $file"
fi
done
echo "needs_bump=$NEEDS_VERSION_BUMP" >> $GITHUB_OUTPUT
- name: Skip version bump if not needed
if: steps.check-changes.outputs.needs_bump != 'true'
run: |
echo "No version bump needed. Exiting job."
exit 0
- name: Set up Python
if: steps.check-changes.outputs.needs_bump == 'true'
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install bump-my-version
if: steps.check-changes.outputs.needs_bump == 'true'
run: pip install bump-my-version

- name: Configure Git
if: steps.check-changes.outputs.needs_bump == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Determine version bump type
if: steps.check-changes.outputs.needs_bump == 'true'
id: bump-type
run: |
if [[ ${{ contains(github.event.pull_request.labels.*.name, 'major update') }} == true ]]; then
Expand All @@ -74,7 +77,6 @@ jobs:
- name: Create version bump branch and PR
id: version-update
if: steps.check-changes.outputs.needs_bump == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[project]
name = "brainscore_vision"
version = "2.2.6"
version = "2.2.5"
description = "The Brain-Score library enables model comparisons to behavioral and neural experiments"
authors = []
license = { 'file' = 'LICENSE' }
Expand Down

0 comments on commit 46f1fe7

Please sign in to comment.