Skip to content

Commit

Permalink
Show git hash during release assets build (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop authored Jul 4, 2023
1 parent fa6f9cd commit a1cb915
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit a1cb915

Please sign in to comment.