chore(ci): fix default branch in Dockerfiles (#875)

pull/877/head
nils måsén 4 years ago committed by GitHub
parent da56c215db
commit a5ffb653df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/bin/bash
VERSION=$(git describe)
VERSION=$(git describe --tags)
echo "Building $VERSION..."
go build -o watchtower -ldflags "-X github.com/containrrr/watchtower/cmd.version=$VERSION"

@ -4,8 +4,8 @@
FROM golang:alpine as builder
# use version (for example "v0.3.3") or "master"
ARG WATCHTOWER_VERSION=master
# use version (for example "v0.3.3") or "main"
ARG WATCHTOWER_VERSION=main
RUN apk add --no-cache \
alpine-sdk \
@ -18,7 +18,7 @@ COPY . /watchtower
RUN \
cd /watchtower && \
\
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . && \
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/containrrr/watchtower/cmd.version=$(git describe --tags)" . && \
GO111MODULE=on go test ./... -v

@ -4,8 +4,8 @@
FROM golang:alpine as builder
# use version (for example "v0.3.3") or "master"
ARG WATCHTOWER_VERSION=master
# use version (for example "v0.3.3") or "main"
ARG WATCHTOWER_VERSION=main
RUN apk add --no-cache \
alpine-sdk \
@ -18,7 +18,7 @@ RUN git clone --branch "${WATCHTOWER_VERSION}" https://github.com/containrrr/wat
RUN \
cd watchtower && \
\
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . && \
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -X github.com/containrrr/watchtower/cmd.version=$(git describe --tags)" . && \
GO111MODULE=on go test ./... -v

Loading…
Cancel
Save