Skip to content

Commit

Permalink
Merge pull request #35 from host6/fix-update-voedger-dependency
Browse files Browse the repository at this point in the history
fix update voedger dependency action
  • Loading branch information
ivvist authored Dec 13, 2024
2 parents 6bcdaa0 + 70be2c9 commit 1fad04b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/update-bp3-voedger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
go env -w GOSUMDB=off
echo "gh_event: $gh_event"

if [[ "$gh_event" == "workflow_dispatch" || "$gh_event" == "schedule" ]]; then
if [[ "$gh_event" == "workflow_dispatch" || "$gh_event" == "schedule" ]]; then

header="Accept: application/vnd.github+json"
repo_full_name="https://api.github.com/repos/voedger/voedger/commits/main"
last_commit=$(curl -s -u "${github_token}:x-oauth-basic" -H $header $repo_full_name | jq -r '.commit.message')
echo "last_commit: $last_commit"
last_commit_message=$(curl -s -u "${github_token}:x-oauth-basic" -H $header $repo_full_name | jq -r '.commit.message')
echo "last_commit_message: $last_commit_message"
last_commit_hash=$(git ls-remote github.com/voedger/voedger refs/heads/main | awk '{print $1}')
echo "last_commit_hash: $last_commit_hash"

go get github.com/voedger/voedger@main
go get github.com/voedger/voedger@$last_commit_hash
go mod tidy

fi

0 comments on commit 1fad04b

Please sign in to comment.