Deploying a new version results in Main being deployed
Opened this issue · 1 comments
dodge245 commented
Describe the bug
All of the deployment scripts refer to the "main" branch in git, therefore when attempting to update to a new version its possible to deploy unwanted changes, for example the latest release 1.2.0 is 8 commits behind the "main" branch:
To Reproduce
Steps to reproduce the behavior:
- Run the Deploy.sh or update.sh scripts
Expected behavior
The version should be a variable that can be used to retrieve the correct version to deploy.
Additional context
Providing a link to the update.sh script as an example:
https://github.com/aws-samples/iam-identity-center-team/blob/main/deployment/update.sh#L30
if [ -z "$SECRET_NAME" ]; then
git remote remove origin
git remote add origin codecommit::$REGION://team-idc-app
git remote add team https://github.com/aws-samples/iam-identity-center-team.git
git pull team main
this should be updated to something like:
export VERSION=1.2.0
if [ -z "$SECRET_NAME" ]; then
git remote remove origin
git remote add origin codecommit::$REGION://team-idc-app
git remote add team https://github.com/aws-samples/iam-identity-center-team.git
git checkout -B main
git pull team $VERSION
neilherbertuk commented