fix(dagger): correctly inject version number during build (#6596)

* fix(dagger): correctly inject version number during build

* test version

---------

Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
Leonardo Cecchi 2024-07-02 17:06:42 +02:00 committed by GitHub
parent ede2c6176d
commit 6167620a57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,16 +21,14 @@ build:
LDFLAGS: LDFLAGS:
- -s - -s
- -w - -w
- -X go.dagger.io/dagger/version.Version={{ version }} - -X github.com/dagger/dagger/engine.Version={{ version }}
- -X go.dagger.io/dagger/version.Revision=tea
linux: linux:
# or segmentation fault # or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
LDFLAGS: LDFLAGS:
- -buildmode=pie - -buildmode=pie
test: | test: dagger version | grep '{{version}}'
dagger version
# This is a better test, but we might mask failures using || true # This is a better test, but we might mask failures using || true
# think more about this. # think more about this.
#out=$(dagger query <<EOF 2>&1 || true #out=$(dagger query <<EOF 2>&1 || true