Skip to content

Commit

Permalink
push branch to origin
Browse files Browse the repository at this point in the history
  • Loading branch information
aherrmann committed Nov 22, 2023
1 parent 4f7a373 commit 6ab33fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/zig_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ jobs:
bazel run //util:update_zig_versions
[ -z "$(git status --porcelain=v1 zig/private/versions.bzl 2>/dev/null)" ] || {
NEW_VERSION="$(grep -m 1 -oP '^\s+"\K\d+\.\d+\.\d+(?=":)' zig/private/versions.bzl)"
BRANCH="zig-update-$NEW_VERSION"
git switch -c "$BRANCH"
git add zig/private/versions.bzl
readarray -t FILES < <(git grep -l -F "$OLD_VERSION" -- ':(exclude)zig/private/versions.bzl')
sed -i "s/${OLD_VERSION//./\\.}/$NEW_VERSION/g" "${FILES[@]}"
git add "${FILES[@]}"
git config user.name "GitHub"
git config user.email "[email protected]"
git commit -m 'update Zig versions'
git push -u origin "$BRANCH"
gh pr create \
--title "chore: update Zig versions up to $NEW_VERSION" \
--body "- [ ] Check that the automatic version replacements make sense."
Expand Down

0 comments on commit 6ab33fd

Please sign in to comment.