You've already forked watchtower
							
							
				mirror of
				https://github.com/containrrr/watchtower.git
				synced 2025-10-31 00:17:44 +02:00 
			
		
		
		
	chore(ci): fix default branch in Dockerfiles (#875)
This commit is contained in:
		
							
								
								
									
										4
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								build.sh
									
									
									
									
									
								
							| @@ -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" | ||||
| 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 | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user