Skip to content

Commit 0769bee

Browse files
committed
support for pre-releases
1 parent d6b3599 commit 0769bee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/publish-synd-cli.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
tag_name: ${{ env.TAG_NAME }}
116116
name: "synd-cli ${{ env.TAG_NAME }}"
117117
body: "Release of synd-cli ${{ env.TAG_NAME }}"
118+
prerelease: ${{ contains(inputs.version, '-') }}
118119
files: |
119120
synd-cli-linux-x64-${{ env.TAG_NAME }}
120121
synd-cli-linux-arm64-${{ env.TAG_NAME }}

synd-cli/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ detect_platform() {
5151

5252
get_latest_version() {
5353
local latest
54-
# Find the latest synd-cli release (tags starting with "synd-cli-")
54+
# Find the latest stable synd-cli release (X.Y.Z without pre-release suffix)
5555
# The "|| true" prevents pipefail from exiting the script when no version is found
5656
latest=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases" | \
5757
grep '"tag_name"' | \
5858
sed -E 's/.*"([^"]+)".*/\1/' | \
59-
grep '^synd-cli-' | \
59+
grep -E '^synd-cli-v[0-9]+\.[0-9]+\.[0-9]+$' | \
6060
head -n 1 || true)
6161

6262
if [[ -z "$latest" ]]; then

0 commit comments

Comments
 (0)