Skip to content

Commit

Permalink
chore : add script to tag a new version (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
odelcroi authored Oct 4, 2023
1 parent b6e13db commit 391d5a3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions scripts/tchap/tag_new_version.sh
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"

0 comments on commit 391d5a3

Please sign in to comment.