Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper script to run gen script #36

Merged
merged 1 commit into from Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions hack/gen.sh
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

if [ "$(git branch --show-current)" != "master" ]; then
echo "Not in master branch. Aborting."
exit 1
fi

BRANCH_NAME="update-gh-definitions-$(date '+%s')"

git checkout -b ${BRANCH_NAME}

go run main.go

if [ "$(git status --porcelain | wc -l)" != "1" ]; then
echo "Found more changes than expected. Aborting."
exit 1
fi

git commit -am "Update GH definitions"

git push origin ${BRANCH_NAME}