Skip to content

Commit

Permalink
Script fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Feb 26, 2024
1 parent 623ce92 commit 40f5137
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fi
for i in 1 2 3
do
curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@${{ matrix.config.branch }} | PREFIX=. sh && break || sleep 30
curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@$branch | PREFIX=. sh && break || sleep 30
done
sudo mv nats-server /usr/local/bin
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
fail-fast: false
matrix:
config:
- branch: 'v2.9.22'
- branch: 'v2.10.9'
- branch: 'v2.9'
- branch: 'latest'
- branch: 'main'
runs-on: ubuntu-latest
env:
Expand All @@ -24,9 +24,16 @@ jobs:
steps:
- name: Install nats-server
run: |
gh_api_url="https://api.github.com/repos/nats-io/nats-server/releases"
branch="${{ matrix.config.branch }}"
if [[ $branch == "v"* ]]; then
branch=$(curl -s $gh_api_url | jq -r '.[].tag_name' | grep $branch | sort -V | tail -1)
elif [[ $branch == "latest" ]]; then
branch=$(curl -s $gh_api_url/latest | jq -r .tag_name)
fi
for i in 1 2 3
do
curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@${{ matrix.config.branch }} | PREFIX=. sh && break || sleep 30
curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@$branch | PREFIX=. sh && break || sleep 30
done
sudo mv nats-server /usr/local/bin
Expand Down

0 comments on commit 40f5137

Please sign in to comment.