@@ -3,12 +3,11 @@ FROM golang:1.6.2-alpine
|
||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
||||
|
||||
ENV VERSION #VERSION#
|
||||
RUN apk --update add git make
|
||||
RUN go get github.com/Masterminds/glide && cd $GOPATH/src/github.com/Masterminds/glide && make install
|
||||
RUN apk --update add git make curl
|
||||
RUN mkdir -p $GOPATH/src/github.com/appleboy/gorush
|
||||
Add build.tar.gz $GOPATH/src/github.com/appleboy/gorush/
|
||||
WORKDIR $GOPATH/src/github.com/appleboy/gorush
|
||||
RUN make bundle
|
||||
RUN make install
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${VERSION}" -o bin/gorush gorush.go
|
||||
|
||||
CMD tar -C bin -czf - gorush
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
cd ${GOPATH}/src/github.com/appleboy/gorush
|
||||
sed -i"" -e "s/localhost/redis/g" config/config.yml
|
||||
sed -i"" -e "s/localhost/redis/g" config/config.go
|
||||
sed -i"" -e "s/localhost/redis/g" config/config_test.go
|
||||
sed -i"" -e "s/localhost/redis/g" gorush/status_test.go
|
||||
sed -i"" -e "s/localhost/redis/g" storage/redis/redis_test.go
|
||||
make bundle && make test
|
||||
make install && make test
|
||||
|
||||
Reference in New Issue
Block a user