File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ builds:
1919 - goos : linux
2020 goarch : arm64
2121 ldflags : >
22- -X github.com/gocardless/theatre/cmd.Version={{.Version}}
23- -X github.com/gocardless/theatre/cmd.Commit={{.Commit}}
24- -X github.com/gocardless/theatre/cmd.Date={{.Date}}
22+ -X github.com/gocardless/theatre/v3/ cmd.Version={{.Version}}
23+ -X github.com/gocardless/theatre/v3/ cmd.Commit={{.Commit}}
24+ -X github.com/gocardless/theatre/v3/ cmd.Date={{.Date}}
2525 -a
2626 -installsuffix cgo
2727 env :
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ FROM golang:1.20.5 as builder
33WORKDIR /go/src/github.com/gocardless/theatre
44
55COPY . /go/src/github.com/gocardless/theatre
6+ ARG git_revision=unset
7+ RUN echo $git_revision > REVISION
68RUN set -x \
7- && make VERSION="$(cat VERSION)" build
9+ && make VERSION="$(cat VERSION)" GIT_REVISION= "$(cat REVISION)" build
810
911# Use ubuntu as our base package to enable generic system tools
1012FROM ubuntu:jammy-20230522
@@ -20,4 +22,6 @@ RUN set -x \
2022
2123WORKDIR /
2224COPY --from=builder /go/src/github.com/gocardless/theatre/bin/* /usr/local/bin/
25+ ARG git_revision=unset
26+ RUN echo $git_revision > REVISION
2327ENTRYPOINT ["/bin/bash" ]
Original file line number Diff line number Diff line change 11PROG =bin/rbac-manager bin/vault-manager bin/theatre-secrets bin/workloads-manager bin/theatre-consoles
22PROJECT =github.com/gocardless/theatre
33IMAGE =eu.gcr.io/gc-containers/gocardless/theatre
4- VERSION =$(shell git rev-parse --short HEAD) -dev
5- BUILD_COMMAND =go build -ldflags "-s -w -X main.Version=$(VERSION ) "
4+ VERSION =$(shell git describe --tags --dirty --long)
5+ GIT_REVISION =$(shell git rev-parse HEAD)
6+ DATE =$(shell date +"% Y% m% d.% H% M% S")
7+ LDFLAGS =-ldflags "-s -X github.com/gocardless/theatre/v3/cmd.Version=$(VERSION ) -X github.com/gocardless/theatre/v3/cmd.Commit=$(GIT_REVISION ) -X github.com/gocardless/theatre/v3/cmd.Date=$(DATE ) "
8+ BUILD_COMMAND =go build $(LDFLAGS )
69
710# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
811ifeq (,$(shell go env GOBIN) )
Original file line number Diff line number Diff line change 1- 4.2.0
1+ 4.2.1
You can’t perform that action at this time.
0 commit comments