Skip to content

Commit 89fe61f

Browse files
committed
🔧 Fix Go cache path and install script control flow
- Fix Go modules cache to look for go.sum in specific subdirectories - Fix install script to properly handle missing releases without duplicate builds
1 parent 263f85c commit 89fe61f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/release-stdio2sse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
path: |
4848
~/.cache/go-build
4949
~/go/pkg/mod
50-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
50+
key: ${{ runner.os }}-go-${{ hashFiles('sidekick/go.sum', 'stdio2sse/go.sum') }}
5151
restore-keys: |
5252
${{ runner.os }}-go-
5353

stdio2sse/install.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ get_latest_version() {
109109
fi
110110

111111
if [[ -z "$VERSION" ]]; then
112-
log_warning "No stdio2sse releases found on GitHub. Building from source instead..."
113-
build_from_source
114-
return
112+
log_warning "No stdio2sse releases found on GitHub. Will build from source instead..."
113+
return 1
115114
fi
116115

117116
log_success "Latest stdio2sse version: $VERSION"
@@ -354,11 +353,14 @@ main() {
354353
build_from_source
355354
else
356355
# Get latest version
357-
get_latest_version
358-
359-
# Try to download binary, fallback to building from source
360-
if ! download_binary; then
361-
log_warning "Failed to download pre-built binary"
356+
if get_latest_version; then
357+
# Try to download binary, fallback to building from source
358+
if ! download_binary; then
359+
log_warning "Failed to download pre-built binary"
360+
build_from_source
361+
fi
362+
else
363+
# No releases found, build from source
362364
build_from_source
363365
fi
364366
fi

0 commit comments

Comments
 (0)