-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore : add script to tag a new version (#751)
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a command exits with a non-zero status. | ||
|
||
# Check for the argument | ||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 <version_number>" | ||
exit 1 | ||
fi | ||
|
||
VERSION=$1 | ||
|
||
# Create a new branch from develop_tchap | ||
git checkout -b bump-to-${VERSION} develop_tchap | ||
|
||
# Update package.json | ||
npm version ${VERSION} --no-commit-hooks --no-git-tag-version | ||
|
||
# Generate the yarn.lock | ||
yarn install | ||
|
||
|
||
# Commit only the package.json and yarn.lock changes | ||
git add package.json yarn.lock | ||
git commit -m "Bump to ${VERSION}" | ||
git push --set-upstream origin bump-to-${VERSION} | ||
|
||
|
||
# Create a new tag from develop_tchap and push it to the repo | ||
git tag tchap-${VERSION} | ||
git push origin tchap-${VERSION} | ||
|
||
# Information for the user | ||
echo "Don't forget to open a PR and have it validated. Verify with the Review App that the application builds and runs correctly. If not, remove the tag and delete the release" | ||
echo "For the next steps, go see the wiki in the infra repo: https://github.com/tchapgouv/tchap-infra/wiki/Deploy-tchap-web-on-webserver" |