Skip to content

Commit 3a59c43

Browse files
committed
Fix how we fix version in conf from release script
1 parent e82061a commit 3a59c43

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

tools/release.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ if !(( FORCE )); then
6565
fi
6666
fi
6767

68+
# On master, still update version in source/conf.py
69+
if [ "$BRANCH" == "master" ]; then
70+
# Fix version & release in conf.py
71+
sed -i -r \
72+
-e "s/^version = u'.*'.*/version = u'$VERSION'/" \
73+
-e "s/^release = u'.*'.*/release = u'$VERSION'/" \
74+
source/conf.py
75+
76+
# Make commit, tag it as nightly & push it, tag will be published later in this script
77+
if git status -s | grep -q -E '^ ?M+ '; then
78+
git commit -a -m "Update version in conf"
79+
git tag -f nightly
80+
(( PUSH )) && git push
81+
fi
82+
fi
83+
6884
# Check we are in a dedicated branch
6985
case "$BRANCH" in
7086
"")
@@ -91,12 +107,6 @@ case "$BRANCH" in
91107
;;
92108
esac
93109

94-
# Fix version & release in conf.py
95-
sed -i -r \
96-
-e "s/^version = u'.*'.*/version = u'$VERSION'/" \
97-
-e "s/^release = u'.*'.*/release = u'$VERSION'/" \
98-
source/conf.py
99-
100110
# Update any |version| found
101111
grep -lr '|version|' source | grep -v source/conf.py | \
102112
while read file

0 commit comments

Comments
 (0)