File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,20 @@ bump-major:
122122
123123# Bump beta version (x.x.x-beta)
124124bump-beta :
125- $(eval NEW_BETA_NUM := $(shell echo $$(($(BETA_NUM ) + 1 ) ) ) )
126- $(eval NEW_VERSION := $(VERSION_BASE ) -beta$(NEW_BETA_NUM ) )
127- $(call update_version,$(NEW_VERSION ) )
125+ @if echo " $( CURRENT_VERSION) " | grep -q " beta" ; then \
126+ NEW_BETA_NUM=$$(($(BETA_NUM ) + 1 ) ); \
127+ NEW_VERSION=" $( VERSION_BASE) -beta$$ NEW_BETA_NUM" ; \
128+ else \
129+ NEW_PATCH=$$(($(PATCH ) + 1 ) ); \
130+ NEW_VERSION=" $( MAJOR) .$( MINOR) .$$ NEW_PATCH-beta1" ; \
131+ fi ; \
132+ echo " Updating version to $$ NEW_VERSION" ; \
133+ sed -i.bak " s/__version__ = \" [^\" ]*\" /__version__ = \" $$ NEW_VERSION\" /" $(VERSION_FILE ) ; \
134+ rm -f $(VERSION_FILE ) .bak; \
135+ git add $(VERSION_FILE ) ; \
136+ git commit -m " Bump version to $$ NEW_VERSION" ; \
137+ git tag -a " v$$ NEW_VERSION" -m " Version $$ NEW_VERSION" ; \
138+ echo " Version updated to $$ NEW_VERSION. Don't forget to push with: git push && git push --tags"
128139
129140# Remove beta suffix for release (x.x.x-betaX -> x.x.x)
130141release :
You can’t perform that action at this time.
0 commit comments