diff --git a/.appveyor.yml b/.appveyor.yml index 5aa331d..3ad76fa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,7 +37,7 @@ before_build: build_script: - git describe --tags > version - set /p GIT_VERSION= < version - - go build -o smimesign-%GOARCH%.exe -ldflags "-w -extldflags \"-static\" -extld=%EXTLD%" -i . + - go build -o smimesign-%GOARCH%.exe -ldflags "-X main.versionString=%GIT_VERSION% -w -extldflags \"-static\" -extld=%EXTLD%" -i . - 7z a smimesign-%GIT_VERSION%-windows-%GOARCH%.zip smimesign-%GOARCH%.exe test_script: diff --git a/.travis.yml b/.travis.yml index 36b2e2f..19d56a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ install: '' script: - GIT_VERSION=$(git describe --tags) - - go build -o smimesign . + - go build -o smimesign -ldflags "-X main.versionString=$GIT_VERSION" . - tar czf smimesign-$GIT_VERSION-macos.tgz smimesign - go test -v ./...