Skip to content

Commit

Permalink
Fix version generation
Browse files Browse the repository at this point in the history
  • Loading branch information
erickskrauch committed Dec 13, 2023
1 parent 8959e53 commit 6cb5e1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)
VERSION="${BRANCH_NAME}-${SHORT_SHA}"
fi
echo "version=$VERSION" >> $GITHUB_ENV
echo "### Version: $VERSION" >> $GITHUB_STEP_SUMMARY
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -62,4 +63,4 @@ jobs:
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ steps.version.output.version }}
COMMIT=${{ github.ref }}
COMMIT=${{ github.sha }}
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ RUN go mod download
RUN CGO_ENABLED=0 \
go build \
-trimpath \
-ldflags "-X github.com/elyby/chrly/version.version=$VERSION -X github.com/elyby/chrly/version.commit=$COMMIT" \
-ldflags="-w -s" \
-ldflags "-w -s -X github.com/elyby/chrly/version.version=$VERSION -X github.com/elyby/chrly/version.commit=$COMMIT" \
-o chrly \
main.go

Expand Down

0 comments on commit 6cb5e1e

Please sign in to comment.