Skip to content

Commit

Permalink
fixup: use git diff instead of checksum
Browse files Browse the repository at this point in the history
Signed-off-by: 170210 <j170210@icloud.com>
  • Loading branch information
170210 committed Sep 4, 2023
1 parent f8bdf99 commit c6040a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy_to_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ jobs:
run: |
mv ./artifacts/linux-shared-library/* ./internal/api
mv ./artifacts/macos-shared-library/* ./internal/api
cd ./internal/api
new_checksums=$(shasum -a 256 *.so *.dylib)
old_checksums=$(cat checksums.txt)
if [[ "$new_checksums" != "$old_checksums" ]] ; then
chmod 755 internal/api/*.{so,dylib}
git add .
if ! git diff --cached --exit-code ; then
echo "need_update=true" >> "$GITHUB_OUTPUT"
echo "$new_checksums" > checksums.txt
else
echo "need_update=false" >> "$GITHUB_OUTPUT"
fi
Expand All @@ -117,7 +115,6 @@ jobs:
run: |
git config user.name "finschia-auto-pr[bot]"
git config user.email "141415241+finschia-auto-pr[bot]@users.noreply.github.com"
git add .
git commit -m "chore: auto generate shared library"
- name: Create pull request
if: steps.cd.outputs.need_update=='true'
Expand Down
3 changes: 0 additions & 3 deletions internal/api/checksums.txt

This file was deleted.

0 comments on commit c6040a1

Please sign in to comment.