Skip to content

Commit e8d6014

Browse files
committed
update makefile
1 parent 6929db7 commit e8d6014

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,38 @@ CURRENT_PATCH = $(word 3, $(subst ., ,$(CURRENT_VERSION)))
2121

2222
# Bump the version based on the specified type (major, minor, patch)
2323
bump-version:
24-
@if [ "$(TYPE)" == "$(MAJOR_BUMP)" ]; then \
24+
@if [ "$(TYPE)" = "$(MAJOR_BUMP)" ]; then \
2525
NEW_MAJOR=$$(($(CURRENT_MAJOR) + 1)); \
2626
NEW_MINOR=0; \
2727
NEW_PATCH=0; \
28-
elif [ "$(TYPE)" == "$(MINOR_BUMP)" ]; then \
28+
elif [ "$(TYPE)" = "$(MINOR_BUMP)" ]; then \
2929
NEW_MAJOR=$(CURRENT_MAJOR); \
3030
NEW_MINOR=$$(($(CURRENT_MINOR) + 1)); \
3131
NEW_PATCH=0; \
32-
elif [ "$(TYPE)" == "$(PATCH_BUMP)" ]; then \
32+
elif [ "$(TYPE)" = "$(PATCH_BUMP)" ]; then \
3333
NEW_MAJOR=$(CURRENT_MAJOR); \
3434
NEW_MINOR=$(CURRENT_MINOR); \
3535
NEW_PATCH=$$(($(CURRENT_PATCH) + 1)); \
3636
else \
3737
echo "Invalid version bump type. Use major, minor, or patch."; \
3838
exit 1; \
3939
fi; \
40-
if [ "$(PRE_RELEASE)" == "alpha" ]; then \
40+
if [ "$(PRE_RELEASE)" = "alpha" ]; then \
4141
NEW_VERSION=$${NEW_MAJOR}.$${NEW_MINOR}.$${NEW_PATCH}$(ALPHA_SUFFIX); \
42-
elif [ "$(PRE_RELEASE)" == "beta" ]; then \
42+
elif [ "$(PRE_RELEASE)" = "beta" ]; then \
4343
NEW_VERSION=$${NEW_MAJOR}.$${NEW_MINOR}.$${NEW_PATCH}$(BETA_SUFFIX); \
4444
else \
4545
NEW_VERSION=$${NEW_MAJOR}.$${NEW_MINOR}.$${NEW_PATCH}; \
4646
fi; \
4747
echo "New version: $${NEW_VERSION}"; \
48-
echo $${NEW_VERSION} > $(VERSION_FILE); \
48+
echo "$${NEW_VERSION}" > $(VERSION_FILE); \
49+
echo "Version bumped and tagged as $(TAG_PREFIX)$${NEW_VERSION}"; \
50+
(cd ui && node updateVersion.js); \
51+
echo "Version updated in the frontend"; \
4952
git commit -am "Bump version to $${NEW_VERSION}"; \
5053
git tag $(TAG_PREFIX)$${NEW_VERSION}; \
51-
echo "Version bumped and tagged as $(TAG_PREFIX)$${NEW_VERSION}"; \
52-
cd ui && node updateVersion.js
53-
echo "Version updated in the frontend"
54+
git push origin main; \
55+
git push origin $(TAG_PREFIX)$${NEW_VERSION}
5456

5557
# To create a release (alpha, beta, or final) based on the version bump type
5658
release:

0 commit comments

Comments
 (0)