-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
28 lines (23 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
VERSION=0.1.16
NAME=pspk
GIT_REV?=$(shell git rev-parse --short HEAD)
LDFLAGS=-ldflags "-X main.Version=$(VERSION) -X main.Hash=$(GIT_REV) -X main.BuildDate=$(BUILD_DATE)"
GO=GO111MOUDLE=on go
SIGNATORY=pspk-sign
build:
VERSION=$(VERSION)-dev $(GO) build $(LDFLAGS) -o bin/${NAME} ./cmd/cli/
release: clean
mkdir -p _build
GOOS=darwin GOARCH=amd64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-$(VERSION)-darwin-amd64 ./cmd/cli
GOOS=linux GOARCH=amd64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-$(VERSION)-linux-amd64 ./cmd/cli
GOOS=linux GOARCH=arm $(GO) build $(LDFLAGS) -o _build/$(NAME)-$(VERSION)-linux-arm ./cmd/cli
GOOS=linux GOARCH=arm64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-$(VERSION)-linux-arm64 ./cmd/cli
GOOS=darwin GOARCH=amd64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-srv-$(VERSION)-darwin-amd64 ./cmd/server
GOOS=linux GOARCH=amd64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-srv-$(VERSION)-linux-amd64 ./cmd/server
GOOS=linux GOARCH=arm $(GO) build $(LDFLAGS) -o _build/$(NAME)-srv-$(VERSION)-linux-arm ./cmd/server
GOOS=linux GOARCH=arm64 $(GO) build $(LDFLAGS) -o _build/$(NAME)-srv-$(VERSION)-linux-arm64 ./cmd/server
cd _build; sha256sum * > sha256sums.txt
clean:
rm -rf _build
release_web:
scp -r ./web/* ${FREECONTENT_SPACE}:/var/www/pspk/