mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00

* Ignore Node files that should not be tracked The list can be fetched by `gibo dump node`. * Untrack node_modules/@actions * Cache node_modules * Don't add node_modules ins Bash scripts * Use ncc to pack dependencies * Change final product path Remove & ignore previous one (lib/main.js{,.map}) * Disable PR check using author's key Author's key is not passed to PR builds (#164) * update settings * update CHANGELOG * update build.yml Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
37 lines
662 B
Bash
Executable file
37 lines
662 B
Bash
Executable file
#!/bin/bash
|
|
# update dependencies
|
|
set -eu
|
|
|
|
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
|
|
git add package.json package-lock.json lib
|
|
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}
|
|
"
|