1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00
ssh-key-action/scripts/update-dependencies.sh
shimataro f55d9bd4d2
Bugfix/node modules (#100)
* * clean node_modules before "npm ci --only=production" in order not to add ".bin" directory

* * update CHANGELOG
2020-01-27 06:03:22 +09:00

40 lines
716 B
Bash
Executable file

#!/bin/bash
# update dependencies
set -e
DATE=$(date +"%Y%m%d")
BRANCH=feature/update-dependencies-${DATE}
COLOR_SUCCESS="\e[1;32m"
COLOR_RESET="\e[m"
# create branch
git checkout develop
git checkout -b ${BRANCH}
# check updates
npm ci
npm run check-updates -- -u
# re-install packages
rm -rf package-lock.json node_modules
npm i
# check
npm run build
npm run verify
# commit
rm -rf node_modules
npm ci --only=production
git add package.json package-lock.json node_modules
git commit -m "update dependencies"
# finished!
echo -e "
${COLOR_SUCCESS}🎉All dependencies are updated successfully.🎉${COLOR_RESET}
Push changes and merge into 'develop' branch.
git push --set-upstream origin ${BRANCH}
"