Skip to content

Commit

Permalink
Add version bump target to Makefile and update version in environment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jan 17, 2025
1 parent ba08841 commit ab33e8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
current_version_number := $(shell git tag --list "v*" | sort -V | tail -n 1 | cut -c 2-)
next_version_number := $(shell echo $$(($(current_version_number)+1)))

bump_version:
$(eval CURRENT_VERSION := $(shell gsed -n "s/.*version: \`\([0-9]\+\).*/\1/p" config/environment.js))
$(eval NEXT_VERSION := $(shell echo $$(($(CURRENT_VERSION) + 1))))
gsed -i 's/version: `[0-9]\+\./version: `$(NEXT_VERSION)./' config/environment.js
@echo "Version bumped from $(CURRENT_VERSION) to $(NEXT_VERSION) in config/environment.js"

lint:
npm run lint:fix

Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function (environment) {

// Update the major version number to force all clients to update.
// The minor version doesn't do anything at the moment, might use in the future.
version: `25.0.${process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 7) || 'dev'}`,
version: `26.0.${process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 7) || 'dev'}`,
},
fastboot: {
hostWhitelist: [/^localhost:\d+$/],
Expand Down

0 comments on commit ab33e8e

Please sign in to comment.