generated from jeswr/template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lib/*.pl.ts | ||
lib/*.temp.ts | ||
*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Update to use the latest version of eye | ||
on: | ||
schedule: | ||
- cron: '0 10 * * *' | ||
jobs: | ||
get-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Update eye | ||
run: npm run eye:update | ||
- name: Check for modified files | ||
id: git-check | ||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | ||
- name: Commit latest release version | ||
if: steps.git-check.outputs.modified == 'true' | ||
run: | | ||
chmod u+x ./scripts/update-eye.sh | ||
./scripts/update-eye.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
before=$(git diff HEAD~1 | grep "\- \"name\"") | ||
after=$(git diff HEAD~1 | grep "\+ \"name\"") | ||
|
||
# Use change in eye version to determine whether | ||
# this needs to be a major, minor or patch update | ||
if [ ${before:17:2} != ${before:17:2} ]; then | ||
version="breaking" | ||
elif [ ${before:20:4} != ${after:20:4} ]; then | ||
version="feat" | ||
elif [ ${before:25:4} != ${after:25:4} ]; then | ||
version="fix" | ||
fi | ||
|
||
git config --global user.name 'Jesse Wright' | ||
git config --global user.email '63333554+jeswr@users.noreply.github.com' | ||
git commit -am "$version: update eye" | ||
git push |