Skip to content

Commit

Permalink
Add helper script to run gen script
Browse files Browse the repository at this point in the history
  • Loading branch information
migueleliasweb committed Sep 6, 2022
1 parent b297862 commit 241f60c
Showing 1 changed file with 21 additions and 0 deletions.
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}

0 comments on commit 241f60c

Please sign in to comment.