another one

This commit is contained in:
Kwitsch 2022-09-23 20:02:03 +02:00
parent 88af824a10
commit 5c20f01680
3 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,7 @@ RUN --mount=type=bind,target=. \
go build \
-tags static \
-v \
-ldflags="-X github.com/0xERR0R/blocky/util.Version=${VERSION} -X github.com/0xERR0R/blocky/util.BuildTime=${BUILD_TIME}" \
-ldflags="-X github.com/0xERR0R/blocky/util.Version=${VERSION} -X github.com/0xERR0R/blocky/util.BuildTime=${BUILD_TIME} -X github.com/0xERR0R/blocky/util.Architecture=${GOARCH}${TARGETVARIANT}" \
-o /bin/blocky
RUN apk add --no-cache libcap && \

View File

@ -21,4 +21,5 @@ func printVersion(_ *cobra.Command, _ []string) {
fmt.Println("blocky")
fmt.Printf("Version: %s\n", util.Version)
fmt.Printf("Build time: %s\n", util.BuildTime)
fmt.Printf("Architecture: %s\n", util.Architecture)
}

View File

@ -6,4 +6,6 @@ var (
Version = "undefined"
// BuildTime build time of the binary
BuildTime = "undefined"
// Architecture current CPU architecture
Architecture = "amd64"
)