Resolves #22. Fix passing version to the binary

This commit is contained in:
ErickSkrauch 2020-04-23 20:43:36 +03:00
parent fbbb96603c
commit bc2f9564d0
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E
2 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,7 @@ jobs:
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 env CGO_ENABLED=0 GOOS=linux GOARCH=amd64
go build go build
-o release/chrly -o release/chrly
-ldflags '-extldflags "-static" -X github.com/elyby/chrly/version.version=$APP_VERSION -X github.com/elyby/chrly/version.commit=$TRAVIS_COMMIT' -ldflags "-extldflags '-static' -X github.com/elyby/chrly/version.version=$APP_VERSION -X github.com/elyby/chrly/version.commit=$TRAVIS_COMMIT"
main.go main.go
- docker build -t elyby/chrly:$DOCKER_TAG . - docker build -t elyby/chrly:$DOCKER_TAG .
- docker push elyby/chrly:$DOCKER_TAG - docker push elyby/chrly:$DOCKER_TAG

View File

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] - xxxx-xx-xx ## [Unreleased] - xxxx-xx-xx
### Fixed
- [#22](https://github.com/elyby/chrly/issues/22): Correct version passing during building of the Docker image.
## [4.4.0] - 2020-04-22 ## [4.4.0] - 2020-04-22
### Added ### Added