Default Build

This commit is contained in:
Phil 2022-01-06 18:57:39 +01:00
parent bd8d884f09
commit 44a10de0f6

View file

@ -7,10 +7,12 @@ COPY . .
RUN go get -d -v ./... RUN go get -d -v ./...
RUN export I_PACKAGE="git.ucode.space/Phil/goshorly/utils" && \ # RUN export I_PACKAGE="git.ucode.space/Phil/goshorly/utils" && \
export I_GitCommitShort=$(git rev-parse --short HEAD) && \ # export I_GitCommitShort=$(git rev-parse --short HEAD) && \
export I_GitBranch=$(git rev-parse --abbrev-ref HEAD) && \ # export I_GitBranch=$(git rev-parse --abbrev-ref HEAD) && \
go build -a -installsuffix cgo -ldflags "-X $I_PACKAGE.GitCommitShort=$I_GitCommitShort -X $I_PACKAGE.GitBranch=$I_GitBranch" -o app . # go build -a -installsuffix cgo -ldflags "-X $I_PACKAGE.GitCommitShort=$I_GitCommitShort -X $I_PACKAGE.GitBranch=$I_GitBranch" -o app .
RUN go build -o app .
FROM scratch as production FROM scratch as production
WORKDIR /goshorly WORKDIR /goshorly