Skip to content

Commit

Permalink
feature/test workflows for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
choewy committed Mar 18, 2024
1 parent 94b2a5c commit 080f1cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: diff

on: push

jobs:
diff:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: |
previous_commit=$(git rev-parse HEAD~1)
previous=$(git show $previous_commit:package.json | grep '"version"' | awk -F '"' '{print $4}')
current=$(git show HEAD:package.json | grep '"version"' | awk -F '"' '{print $4}')
echo "$previous_commit $previous $current"
2 changes: 1 addition & 1 deletion .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
node-version: 20
- id: version
run: |
previous_commit=$(git rev-parse HEAD^)
previous_commit=$(git rev-parse HEAD~1)
previous=$(git show $previous_commit:package.json | grep '"version"' | awk -F '"' '{print $4}')
current=$(git show HEAD:package.json | grep '"version"' | awk -F '"' '{print $4}')
echo "$previous $current"
Expand Down

0 comments on commit 080f1cd

Please sign in to comment.