Skip to content

Conversation

@jiparis
Copy link
Member

@jiparis jiparis commented Jul 29, 2025

This PR solves the problem when the pushed tag is not the same as the one present in .chainloop.yaml, for example when pushing a patch. Taking the tag value instead of the one in the file, will make the behaviour consistent, avoiding extra PRs to fix the version.

Example (sed error is normal in MacOS):

> GITHUB_REF_NAME=v1.2.3 DEBUG=1 .github/workflows/utils/bump-project-version.sh
+ [[ -n 1 ]]
+ set -x
+ project_yaml=.chainloop.yml
+ [[ -n '' ]]
+ [[ -n v1.2.3 ]]
++ echo v1.2.3
++ awk '-F[ .]' '{print $1"."$2+1"."0}'
+ version=v1.3.0
+ sed -i 's#^projectVersion:.*#projectVersion: v1.3.0#g' .chainloop.yml
sed: 1: ".chainloop.yml": invalid command code .

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from javirln and migmartri July 29, 2025 10:45
@jiparis jiparis merged commit a449597 into chainloop-dev:main Jul 30, 2025
13 checks passed
@jiparis jiparis deleted the fix-bump branch July 30, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants