Skip to content

Commit

Permalink
Try to fix gempush GH workflow
Browse files Browse the repository at this point in the history
Got error: "fatal: ambiguous argument 'HEAD..HEAD^': unknown revision
or path not in the working tree."

Also, make gempush-if-failed script fail on error.
  • Loading branch information
mherold committed Apr 3, 2024
1 parent 16789a8 commit 783da6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/gempush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@master
with:
fetch-depth: 2
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
Expand Down
1 change: 1 addition & 0 deletions bin/gempush-if-changed
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -x
set -euo pipefail
if git diff --name-only HEAD..HEAD^ | egrep -q '^VERSION$'; then
# The VERSION file changed in the last commit, build the gem and push
gem build *.gemspec
Expand Down

0 comments on commit 783da6a

Please sign in to comment.