From bc32a09a5dd7881a9f0ded6b8b13850b902a979f Mon Sep 17 00:00:00 2001 From: Evan Fiordeliso Date: Sat, 15 Apr 2023 18:32:52 -0400 Subject: [PATCH] Update build task --- Taskfile.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index ca1bd50..c3f6dc5 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -7,7 +7,7 @@ vars: BUILD: sh: git rev-parse --short HEAD DATE: - sh: date + sh: date -Iseconds DOCKER_IMAGE: git.fifitido.net/apps/ytdl-web DOCKER_IMAGE_TAG: latest @@ -15,7 +15,14 @@ tasks: deps: go mod download tidy: go mod tidy check: goreleaser check - build: goreleaser build --single-target + build: > + go build -ldflags=" + -X {{.VERSION_PKG}}.Version={{.VERSION}} + -X {{.VERSION_PKG}}.Build={{.BUILD}} + -X {{.VERSION_PKG}}.BuildDate={{.DATE}} + -X {{.VERSION_PKG}}.BuiltBy=taskfile + " + -o {{.OUT}} . dev: air release: goreleaser release