Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow SAM-T version update GHA to get latest tag #5154

Merged
merged 1 commit into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/automated-updates-to-sam-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
repository: aws/serverless-application-model
path: serverless-application-model
ref: main
fetch-depth: 0

- name: Checkout SAM CLI
uses: actions/checkout@v3
Expand All @@ -81,11 +82,13 @@ jobs:
git config --global user.name "GitHub Action"
cd serverless-application-model
SAM_T_CUR_VERSION=$(git describe --tags --abbrev=0 | sed 's/v//')
echo "SAM-T cur version is $SAM_T_CUR_VERSION"
cd ../aws-sam-cli
git checkout -b update_sam_transform_version
SAM_T_PRE_VERSION=$(grep "aws-sam-translator=" requirements/base.txt)
echo "SAM-T pre version is $SAM_T_PRE_VERSION"
git reset --hard develop
sed -i "s/aws-sam-translator=$SAM_T_CUR_VERSION/$SAM_T_PRE_VERSION/g" requirements/base.txt; make update-reproducible-reqs
sed -i "s/$SAM_T_PRE_VERSION/aws-sam-translator==$SAM_T_CUR_VERSION/g" requirements/base.txt; make update-reproducible-reqs
cp -r ../serverless-application-model/tests/translator/input ./tests/functional/commands/validate/lib/models
git status
git diff --quiet && exit 0 # exit if there is no change
Expand Down