Skip to content

Commit

Permalink
chore: update scripts/github.deps.upgrade.sh (#454)
Browse files Browse the repository at this point in the history
Signed-off-by: donniean <[email protected]>
  • Loading branch information
donniean authored Jul 16, 2024
1 parent 5f56c0c commit b74b6f6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/github.deps.upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,29 @@ original_dir=$(pwd)

pr() {
cd "$HOME"/repos/"$1" || exit

# checkout and pull
git checkout main
git branch -D chore
git pull --all --prune

# upgrade dependencies
git checkout -b chore
ncu --upgrade
rm -rf node_modules
rm package-lock.json
npm install

# commit and push
git commit --all --signoff --gpg-sign --message 'chore: bump dependencies'
git push --set-upstream origin chore
open "https://github.com/donniean/$1/compare/main...chore"

# create and merge Pull Request
gh pr create --fill
# pr_output=$(gh pr create --fill)
# pr_url=$(echo "$pr_output" | grep -o 'https://github\.com/[^ ]*')
gh pr merge --auto --squash
gh pr view --web
}

names=(
Expand Down

0 comments on commit b74b6f6

Please sign in to comment.