Last active
October 25, 2019 02:13
-
-
Save chenrui333/2bd0f55ac78e5a53afc2309e8c4aecf3 to your computer and use it in GitHub Desktop.
Upgrade the nodejs lambda runtime to v10
This file contains hidden or 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
#!/bin/bash | |
# repo and ticket env setup | |
REPO_NAME="pro-admin-onboard-email-lambda" | |
PT_TICKET="XX" | |
# checkout the repo and branch | |
git clone [email protected]:meetup/${REPO_NAME}.git | |
cd ${REPO_NAME} | |
git checkout -b ${PT_TICKET}-node-10.16.3 | |
# find and replace the nodejs specifiers | |
## lambda runtime update | |
sed -i "" 's/nodejs8.10/nodejs10.x/g' "serverless.yml" | |
## build env update | |
sed -i "" 's/8.10/10.16.3/g' ".travis.yml" | |
sed -i "" 's/8/10.16.3/g' ".travis.yml" | |
sed -i "" 's/8.10/10.16.3/g' "package.json" | |
sed -i "" 's/8.10/10.16.3/g' ".babelrc" # if it exists | |
sed -i "" 's/8.9/10.16.3/g' ".travis.yml" | |
sed -i "" 's/8.9.0/10.16.3/g' "package.json" | |
# anchor the node-version for nvm | |
echo "10.16.3" > .nvmrc | |
# commit and push the changes | |
git add . | |
git commit -m 'Upgrade to node v10.16.3' | |
git push origin ${PT_ticket}-node-10.16.3 | |
# back to the parent directory | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment