@@ -25,21 +25,7 @@ echo "Creating local release for version: $VERSION"
2525CURRENT_BRANCH=$( git branch --show-current)
2626echo " Current branch: $CURRENT_BRANCH "
2727
28- # 1. Update CITATION.cff with the specified version
29- echo " Updating CITATION.cff..."
30- python3 scripts/update_citation.py " $VERSION "
31-
32- # Check if CITATION.cff was updated
33- if ! git diff --quiet CITATION.cff; then
34- echo " CITATION.cff updated, committing changes..."
35- git add CITATION.cff
36- git commit -m " Update CITATION.cff to version $VERSION "
37- echo " CITATION.cff changes committed successfully."
38- else
39- echo " No changes to CITATION.cff needed."
40- fi
41-
42- # 2. Format code with black
28+ # 1. Format code with black
4329echo " Formatting code with black..."
4430python3 -m black ./
4531if [ $? -ne 0 ]; then
@@ -66,11 +52,26 @@ if [ $? -ne 0 ]; then
6652fi
6753echo " Linting passed successfully."
6854
69- # 5. Create the tag
55+ # 5. Update CITATION.cff and commit changes (only after all checks pass)
56+ echo " Updating CITATION.cff..."
57+ python3 scripts/update_citation.py " $VERSION "
58+
59+ if ! git diff --quiet CITATION.cff; then
60+ echo " CITATION.cff updated, committing changes..."
61+ git add CITATION.cff
62+ git commit -m " Release version $VERSION
63+
64+ - Update CITATION.cff to version $VERSION "
65+ echo " CITATION.cff changes committed successfully."
66+ else
67+ echo " No changes to CITATION.cff needed."
68+ fi
69+
70+ # 6. Create the tag
7071echo " Creating tag v$VERSION ..."
7172git tag " v$VERSION "
7273
73- # 6 . Show what was done
74+ # 7 . Show what was done
7475echo " "
7576echo " Local release completed for version $VERSION !"
7677echo " "
0 commit comments