parent
eeab25af7c
commit
a7c989263e
@ -1,10 +1,14 @@ |
||||
# Docker image for the Drone GitHub Release plugin |
||||
# |
||||
# cd $GOPATH/src/github.com/drone-plugins/drone-github-release |
||||
# GO15VENDOREXPERIMENT=1 CGO_ENABLED=0 go build -a -tags netgo |
||||
# docker build --rm=true -t plugins/drone-github-release . |
||||
# make deps build docker |
||||
|
||||
FROM alpine:3.2 |
||||
RUN apk add -U ca-certificates && rm -rf /var/cache/apk/* |
||||
|
||||
RUN apk update && \ |
||||
apk add \ |
||||
ca-certificates && \ |
||||
rm -rf /var/cache/apk/* |
||||
|
||||
ADD drone-github-release /bin/ |
||||
ENTRYPOINT ["/bin/drone-github-release"] |
||||
|
@ -0,0 +1,25 @@ |
||||
.PHONY: clean deps test build docker |
||||
|
||||
export GOOS ?= linux
|
||||
export GOARCH ?= amd64
|
||||
export CGO_ENABLED ?= 0
|
||||
|
||||
CI_BUILD_NUMBER ?= 0
|
||||
|
||||
LDFLAGS += -X "main.buildDate=$(shell date -u '+%Y-%m-%d %H:%M:%S %Z')"
|
||||
LDFLAGS += -X "main.build=$(CI_BUILD_NUMBER)"
|
||||
|
||||
clean: |
||||
go clean -i ./...
|
||||
|
||||
deps: |
||||
go get -t ./...
|
||||
|
||||
test: |
||||
go test -cover ./...
|
||||
|
||||
build: |
||||
go build -ldflags '-s -w $(LDFLAGS)'
|
||||
|
||||
docker: |
||||
docker build --rm=true -t plugins/drone-github-release .
|
Loading…
Reference in new issue