mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
Feature/scripts (#18)
* * add rebuild script * * add update-dependencies script
This commit is contained in:
parent
f250ef75b2
commit
c165d63ea9
2 changed files with 43 additions and 0 deletions
36
scripts/update-dependencies.sh
Executable file
36
scripts/update-dependencies.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
# update dependencies
|
||||
|
||||
DATE=$(date +"%Y%m%d")
|
||||
BRANCH=feature/update-dependencies-${DATE}
|
||||
COLOR_SUCCESS="\e[1;32m"
|
||||
COLOR_RESET="\e[m"
|
||||
|
||||
# create branch
|
||||
git checkout development || exit 1
|
||||
git checkout -b ${BRANCH} || exit 1
|
||||
|
||||
# check updates
|
||||
npm ci
|
||||
npm run check-updates -- -u || exit 1
|
||||
|
||||
# re-install packages
|
||||
rm -rf package-lock.json node_modules || exit 1
|
||||
npm i || exit 1
|
||||
|
||||
# build check
|
||||
npm run build || exit 1
|
||||
|
||||
# commit
|
||||
npm ci --only=production || exit 1
|
||||
git add package.json package-lock.json node_modules || exit 1
|
||||
git commit -m "update dependencies" || exit 1
|
||||
|
||||
# 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}
|
||||
"
|
Loading…
Add table
Add a link
Reference in a new issue