pull/10/head v0.21
Hunter Long 2018-06-24 00:38:50 -07:00
parent 84f6c18c51
commit 9ad7519cd9
3 changed files with 14 additions and 16 deletions

View File

@ -18,7 +18,7 @@ services:
env:
global:
- VERSION=0.2
- VERSION=0.21
matrix:
allow_failures:
@ -40,6 +40,7 @@ deploy:
- "build/statup-linux-arm64"
- "build/statup-linux-arm7"
- "build/statup-windows-x64.exe"
- "build/statup-alpine"
skip_cleanup: true
notifications:

View File

@ -1,17 +1,12 @@
FROM golang:1.10.3-alpine
RUN apk update && apk add git g++
WORKDIR $GOPATH/src/github.com/hunterlong/statup/
RUN go get github.com/GeertJohan/go.rice/rice
COPY . $GOPATH/src/github.com/hunterlong/statup/
RUN go get
RUN rice embed-go
RUN go install
FROM golang:1.10.3 as builder
WORKDIR /go/src/github.com/hunterlong/statup
COPY . .
RUN go get -d -v
RUN CGO_ENABLED=0 GOOS=linux go build -a -o statup .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
VOLUME /app
EXPOSE 8080
CMD ["/go/bin/statup"]
COPY --from=builder /go/src/github.com/hunterlong/statup /app/
RUN chmod +x /app/statup
CMD ["./statup", "version"]

View File

@ -14,6 +14,8 @@ xgo -go 1.10.x --targets=windows-6.0/amd64 --dest=build -ldflags="-X main.VERSIO
xgo -go 1.10.x --targets=linux/arm-7 --dest=build -ldflags="-X main.VERSION=$VERSION" ./
xgo -go 1.10.x --targets=linux/arm64 --dest=build -ldflags="-X main.VERSION=$VERSION" ./
CGO_ENABLED=0 GOOS=linux go build -ldflags="-X main.VERSION=$VERSION" -a -o build/statup-alpine .
cd build
ls
cd ../