Add the build-date back.
- Logic came from
@@ -18,12 +18,15 @@ build:
number: 0
script:
- pushd {{ pkg_src }}
+ - for /F "delims=" %%i in ('date.exe +%Y-%m-%dT%H:%M:%S%:z') DO set BUILT=%%i # [win]
+ - export BUILT=$(date -u +%Y-%m-%dT%H:%M:%S%:z) # [unix]
- go install -v
-ldflags "-X {{ import_path }}/common.NAME='{{ name }}'
-X {{ import_path }}/common.VERSION='{{ version }}'
-X {{ import_path }}/common.REVISION='deadbeef'
-X {{ import_path }}/common.BRANCH='{{ branch }}'
- -X {{ import_path }}/common.BUILT='2019-08-01T00:00:00z'"
+ -X {{ import_path }}/common.BUILT='%BUILT%'" # [win]
+ -X {{ import_path }}/common.BUILT='$BUILT'" # [unix]
.
requirements:
