Skip to content

Commit

Permalink
chore: get parent of prev commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
frolvanya committed Jan 16, 2025
1 parent 7e6acd8 commit 509fa26
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/check-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Fetch full history (if needed)
- name: Fetch git history
run: |
git status
git fetch
echo "Fetched full commit history"
git log --oneline | head -n 20
- name: Install cargo-near
run: |
Expand All @@ -29,8 +26,10 @@ jobs:
- name: Find Last Commit Modifying `res/` Directory
run: |
PREV_COMMIT_HASH=$(git log -1 --format=format:%H -- ./near/res/)
echo "PREV_COMMIT_HASH=${PREV_COMMIT_HASH}" >> $GITHUB_ENV
echo "NEP330_BUILD_INFO_SOURCE_CODE_SNAPSHOT=git+https://github.com/${{ github.repository }}?rev=${PREV_COMMIT_HASH}" >> $GITHUB_ENV
PARENT_COMMIT_HASH=$(git rev-parse ${PREV_COMMIT_HASH}^)
echo "$PREV_COMMIT_HASH"
echo "$PARENT_COMMIT_HASH"
echo "NEP330_BUILD_INFO_SOURCE_CODE_SNAPSHOT=git+https://github.com/${{ github.repository }}?rev=${PARENT_COMMIT_HASH}" >> $GITHUB_ENV
- name: Build NEAR contracts
env:
Expand Down

0 comments on commit 509fa26

Please sign in to comment.