A continuation of HomeBox the inventory and organization system built for the Home User
fix build injection
Hayden1279028d07d4
diff --git a/.github/workflows/partial-publish.yaml b/.github/workflows/partial-publish.yamlindex 3e2cb26d..899cb763 100644--- a/.github/workflows/partial-publish.yaml+++ b/.github/workflows/partial-publish.yaml@@ -60,6 +60,7 @@ jobs:--tag ghcr.io/hay-kot/homebox:nightly \--tag ghcr.io/hay-kot/homebox:latest \--tag ghcr.io/hay-kot/homebox:${{ inputs.tag }} \+ --build-arg VERSION=${{ inputs.tag }} \--build-arg COMMIT=$(git rev-parse HEAD) \--build-arg BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \--platform linux/amd64,linux/arm64,linux/arm/v7 .diff --git a/Dockerfile b/Dockerfileindex 8be44f22..674e8b16 100644--- a/Dockerfile+++ b/Dockerfile@@ -12,6 +12,7 @@ RUN pnpm buildFROM golang:alpine AS builderARG BUILD_TIMEARG COMMIT+ARG VERSIONRUN apk update && \apk upgrade && \apk add --update git build-base gcc g++@@ -22,7 +23,7 @@ RUN go get -d -v ./...RUN rm -rf ./app/api/publicCOPY --from=frontend-builder /app/.output/public ./app/api/publicRUN CGO_ENABLED=1 GOOS=linux go build \- -ldflags "-s -w -X main.Commit=$COMMIT -X main.BuildTime=$BUILD_TIME" \+ -ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \-o /go/bin/api \-v ./app/api/*.godiff --git a/backend/app/api/main.go b/backend/app/api/main.goindex f963808b..09191a4d 100644--- a/backend/app/api/main.go+++ b/backend/app/api/main.go@@ -20,9 +20,9 @@ import ()var (- Version = "0.1.0"- Commit = "HEAD"- BuildTime = "now"+ version = "nightly"+ commit = "HEAD"+ buildTime = "now")// @title Go API Templatesdiff --git a/backend/app/api/routes.go b/backend/app/api/routes.goindex 9befd369..ab14c763 100644--- a/backend/app/api/routes.go+++ b/backend/app/api/routes.go@@ -47,9 +47,9 @@ func (a *app) newRouter(repos *repo.AllRepos) *chi.Mux {v1.WithDemoStatus(a.conf.Demo), // Disable Password Change in Demo Mode)r.Get(v1Base("/status"), v1Ctrl.HandleBase(func() bool { return true }, v1.Build{- Version: Version,- Commit: Commit,- BuildTime: BuildTime,+ Version: version,+ Commit: commit,+ BuildTime: buildTime,}))r.Post(v1Base("/users/register"), v1Ctrl.HandleUserRegistration())