Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show git hash during release assets build #54

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/release-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[[ "$RELEASE_TARGETS" == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_amd64.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_arm64.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && echo "git hash-object: $(git hash-object *)" && tar zcvf ../linux_amd64.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"linux/dbg-amd64"* ]] && (echo "Building Debug Linux AMD64 binary" && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $GO build -race -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64_dbg.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm64.tar.gz * && rm *) || :
[[ "$RELEASE_TARGETS" == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm.tar.gz * && rm *) || :
Expand Down
2 changes: 1 addition & 1 deletion templates/github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
asset_name: linux_amd64.tar.gz
asset_content_type: application/tar+gzip
- name: Upload linux_amd64_dbg.tar.gz
if: hashFiles('linux_amd64.tar.gz') != ''
if: hashFiles('linux_amd64_dbg.tar.gz') != ''
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand Down