Update build task

This commit is contained in:
Evan Fiordeliso 2023-04-15 18:32:52 -04:00
parent 06eaade72b
commit bc32a09a5d
1 changed files with 9 additions and 2 deletions

View File

@ -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