Skip to content

Instantly share code, notes, and snippets.

@ArloL
Last active February 6, 2025 12:02
Show Gist options
  • Save ArloL/567afecbfadda92d4c0f52de2352a764 to your computer and use it in GitHub Desktop.
Save ArloL/567afecbfadda92d4c0f52de2352a764 to your computer and use it in GitHub Desktop.
Script to change multiple repos at once
#!/bin/bash -l
set -o errexit
set -o nounset
set -o xtrace
set -- \
repo-one \
repo-two \
repo-three
for repo in "$@"; do
pushd "${repo}"
git fetch --all --prune
git switch master
git pull
# code build.gradle
# git switch -c "release/2025.07"
# git add build.gradle
# git commit -m "ci: update release steps"
# ./gradlew prepareNextRelease
# git push --set-upstream origin
# gh pr create \
# --title "release: 2025.07" \
# --body ""
# git branch --merged | grep -v 'master' | xargs -n 1 git branch -d
# ./gradlew build -x test
# git commit --amend --no-edit
# git push --force-with-lease
# cp -f ../owasp-dependency-check-suppressions.xml ./gradle/config
popd
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment