Skip to content

Commit

Permalink
add autocommit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Nov 18, 2019
1 parent a2547ce commit c4c63b4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/autocommit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")/.."

git fetch --tags origin master
git reset --hard origin/master
npm i
npx grunt generate

if [[ $(git status --porcelain) ]]; then
npm t || exit 1
git commit -am "automated regeneration"
npx grunt patch
git push --tags origin master
fi

4 comments on commit c4c63b4

@silverwind
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currrently testing if this works in a cron job. If it does, we may be able to move it to CI later.

@xt0rted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had started working on a workflow for this but put it on hold because of how actions were a bit unstable at the time. I can pick this back up if you'd like.

@the-j0k3r
Copy link
Member

@the-j0k3r the-j0k3r commented on c4c63b4 Nov 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actions are due to go live Nov 11th and for some actions you need to setup a secret, like greetings etc,, we dont have org level access to create these secrets.

@silverwind
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script seems to work, it created bd2830e .. bfd6dd7. No hurry to move it to actions, I imagine it would not be as simple because one needs to deal with secrets to push commits and adding GPG signing is a another difficult topic.

Please sign in to comment.