3
Makefile
3
Makefile
@@ -5,11 +5,12 @@ BUILD_IMAGE := "gorush-build"
|
|||||||
TEST_IMAGE := "gorush-testing"
|
TEST_IMAGE := "gorush-testing"
|
||||||
PRODUCTION_IMAGE := "gorush"
|
PRODUCTION_IMAGE := "gorush"
|
||||||
DEPLOY_ACCOUNT := "appleboy"
|
DEPLOY_ACCOUNT := "appleboy"
|
||||||
|
VERSION := $(shell git describe --tags)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build: clean
|
build: clean
|
||||||
sh script/build.sh
|
sh script/build.sh $(VERSION)
|
||||||
|
|
||||||
test: redis_test boltdb_test memory_test config_test
|
test: redis_test boltdb_test memory_test config_test
|
||||||
go test -v -cover -covermode=count -coverprofile=coverage.out ./gorush/...
|
go test -v -cover -covermode=count -coverprofile=coverage.out ./gorush/...
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
OS="darwin linux"
|
OS="darwin linux"
|
||||||
ARCH="amd64"
|
ARCH="amd64"
|
||||||
|
VERSION=$1
|
||||||
|
|
||||||
for GOOS in $OS; do
|
for GOOS in $OS; do
|
||||||
for GOARCH in $ARCH; do
|
for GOARCH in $ARCH; do
|
||||||
@@ -10,6 +11,6 @@ for GOOS in $OS; do
|
|||||||
|
|
||||||
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
|
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
|
||||||
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gorush.go;
|
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gorush.go;
|
||||||
tar -C bin/$GOOS/$GOARCH -czf bin/gorush-$GOOS-$GOARCH.tar.gz gorush
|
tar -C bin/$GOOS/$GOARCH -czf bin/gorush-$VERSION-$GOOS-$GOARCH.tar.gz gorush
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user