github-cli: fix setting build version and date
This commit is contained in:
parent
cee91f6180
commit
4d6216abc2
1 changed files with 3 additions and 3 deletions
|
@ -1,12 +1,12 @@
|
|||
# Template file for 'github-cli'
|
||||
pkgname=github-cli
|
||||
version=1.4.0
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="cli-${version}"
|
||||
build_style=go
|
||||
build_helper=qemu
|
||||
go_import_path="github.com/cli/cli/cmd/gh"
|
||||
go_ldflags="-X github.com/cli/cli/command.Version=v${version}"
|
||||
go_ldflags="-X github.com/cli/cli/internal/build.Version=v${version}"
|
||||
short_desc="GitHub CLI tool"
|
||||
maintainer="shizonic <realtiaz@gmail.com>"
|
||||
license="MIT"
|
||||
|
@ -19,7 +19,7 @@ pre_build() {
|
|||
local _date
|
||||
if [ "$SOURCE_DATE_EPOCH" ]; then
|
||||
_date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
|
||||
go_ldflags="$go_ldflags -X github.com/cli/cli/command.BuildDate=${_date}"
|
||||
go_ldflags="$go_ldflags -X github.com/cli/cli/internal/build.Date=${_date}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue