Skip to content

Commit

Permalink
fix getting pinned commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer committed May 18, 2024
1 parent 9fa5a45 commit 6eed2bd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,16 @@ jobs:

- name: Get pinned commit from hyprpm.toml file
run: |
hash=$GIT_COMMIT_HASH
if [ -z "$hash" ]; then
echo "Failed to get GIT_COMMIT_HASH from /usr/include/hyprland/src/version.h"
exit 1
fi
commit=$(awk -v hash="$hash" '/commit_pins/ { getline; while ($0 !~ /]/) { if ($0 ~ hash) { getline; print $2; exit } getline } }' hyprpm.toml)
commit=$(grep -F "$GIT_COMMIT_HASH" hyprpm.toml | awk -F'"' '{print $4}'
if [ -z "$commit" ]; then
echo "Failed to get pinned commit from hyprpm.toml"
echo "Failed to get pinned commit from hyprpm.toml with GIT_COMMIT_HASH=$GIT_COMMIT_HASH"
exit 1
fi
echo "PINNED_COMMIT=$commit" >> $GITHUB_ENV
- name: Checkout pinned commit
run: |
echo "Checking out pinned commit $PINNED_COMMIT"
git checkout $PINNED_COMMIT
- name: Build current repository
Expand Down

0 comments on commit 6eed2bd

Please sign in to comment.