Skip to content

Commit

Permalink
fix: polygon edge version info
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Atanasievski committed Sep 22, 2023
1 parent 7eba8cc commit 10731da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,24 @@ jobs:
run: |
TAG=${GITHUB_REF#refs/tags/}
echo tag_name=${TAG} >> $GITHUB_OUTPUT
echo release_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ") >> $GITHUB_RELEASE_TIME
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Run GoReleaser
run: |
echo $(date -u +"%Y-%m-%dT%H:%M:%SZ") >> $RELEASE_TIME
docker run \
--rm \
--privileged \
-e CGO_ENABLED=1 \
-e GITHUB_TOKEN \
-e SLACK_WEBHOOK \
-e GITHUB_REF_NAME=${GITHUB_REF_NAME} \
-e GITHUB_SHA=${GITHUB_SHA} \
-e GITHUB_REF=${GITHUB_REF} \
-e RELEASE_TIME=${RELEASE_TIME} \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
Expand All @@ -52,3 +58,6 @@ jobs:
VERSION: ${{ steps.prepare.outputs.tag_name }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
GITHUB_REF_NAME: ${{ GITHUB_REF_NAME }}


8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
ldflags: -s -w -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}'
ldflags: -s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}'

- id: darwin-arm64
main: ./main.go
Expand All @@ -28,7 +28,7 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
ldflags: -s -w -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}'
ldflags: -s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'

- id: linux-amd64
main: ./main.go
Expand All @@ -42,7 +42,7 @@ builds:
- CXX=g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static" -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}'
-s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}' -X 'github.com/0xPolygon/polygon-edge/versioning.Commit=${GITHUB_SHA}' -X 'github.com/0xPolygon/polygon-edge/versioning.Branch=${GITHUB_REF}' -X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=${RELEASE_TIME}'
tags:
- netgo
- osusergo
Expand All @@ -59,7 +59,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static" -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}'
-s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'
tags:
- netgo
- osusergo
Expand Down

0 comments on commit 10731da

Please sign in to comment.