-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 952 Bytes
/
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
29
30
31
VERSION = $(shell git describe --always)
GOFLAGS = -ldflags="-X main.Version=$(VERSION) -s -w"
.PHONY: default dependencies server deploy help
default: help
dependencies:
go get -u github.com/rferrazz/go-selfupdate
server:
test -n "$(GOOS)" # GOOS
test -n "$(GOARCH)" # GOARCH
go build $(GOFLAGS)
mkdir -p bin/server
mv server bin/server/$(GOOS)-$(GOARCH)
deploy:
GOOS=linux GOARCH=amd64 make server
GOOS=darwin GOARCH=amd64 make server
mkdir -p release/server
rm -rf release/server/*
@JFROG_CLI_OFFER_CONFIG=false jfrog bt dlv --user=rferrazz --key=$(BINTRAY_API_KEY) rferrazz/IO-Something/server/rolling release/
go-selfupdate -o release/server bin/server $(VERSION)
@cd release && JFROG_CLI_OFFER_CONFIG=false jfrog bt u --user=rferrazz --key=$(BINTRAY_API_KEY) --override=true --flat=false --publish=true server/ rferrazz/IO-Something/server/rolling
clean:
git clean -dfx
help:
@echo "make [dependencies server clean deploy]"