Skip to content

Commit 2921e45

Browse files
committed
Only attach this version assets to a GitHub release
dist/release caches older builds; uploading the whole directory bloated v0.2.88.
1 parent dd41d68 commit 2921e45

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

scripts/release.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,22 @@ git_push "$ROOT" "$TAG"
312312
# ---- 5. GitHub release on the main repo ------------------------------------
313313
step "GitHub release on $MAIN_REPO"
314314
ASSETS=()
315-
for f in "$STAGE"/*.tar.gz "$STAGE"/*.tar.gz.sha256 "$STAGE"/*.deb "$STAGE"/*.deb.sha256; do
315+
# Only this version — dist/release keeps prior builds for local caching.
316+
for f in \
317+
"$STAGE"/"$BINARY-$VERSION"-*.tar.gz \
318+
"$STAGE"/"$BINARY-$VERSION"-*.tar.gz.sha256 \
319+
"$STAGE"/"${BINARY}_${VERSION}_"*.deb \
320+
"$STAGE"/"${BINARY}_${VERSION}_"*.deb.sha256
321+
do
316322
[ -e "$f" ] && ASSETS+=("$f")
317323
done
324+
[ "${#ASSETS[@]}" -gt 0 ] || die "no assets for $VERSION in $STAGE"
318325
if gh release view "$TAG" --repo "$MAIN_REPO" >/dev/null 2>&1; then
319326
skip "release $TAG exists -- refreshing assets"
320327
gh release upload "$TAG" "${ASSETS[@]}" --repo "$MAIN_REPO" --clobber
321328
else
322329
gh release create "$TAG" "${ASSETS[@]}" \
323-
--repo "$MAIN_REPO" --title "$FORMULA $VERSION" --notes-file "$NOTES_FILE"
330+
--repo "$MAIN_REPO" --title "$BINARY $VERSION" --notes-file "$NOTES_FILE"
324331
info "created release $TAG with ${#ASSETS[@]} assets"
325332
fi
326333

0 commit comments

Comments
 (0)