Last active
February 9, 2021 18:36
-
-
Save felipecesr/839f40f52b4db733564d97faf1319f9e to your computer and use it in GitHub Desktop.
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
# | |
# Script feito para alterar a versão do node nos projetos com serverless. | |
# | |
# Para executar abra o terminal e execute o comando: | |
# bash <(curl -Ls https://gist.githubusercontent.com/felipecesr/839f40f52b4db733564d97faf1319f9e/raw/43ea30fab7bf01917dd5069c032703b381cefd93/node_version.sh) | |
# | |
read -p "Enter the Node.js version (e.g. 12) : " node_version | |
sed -i -E "s/nodejs[0-9]+\.x/nodejs$node_version.x/g" serverless.yml | |
sed -i -E "s/node-version: [0-9]+\.x/node-version: $node_version.x/g" .github/workflows/ci.yml | |
for i in buildspec*.yml; do | |
sed -i -E "s/nodejs: [0-9]+/nodejs: $node_version/g" $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment