-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.51 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.51 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
VERSION = $(shell git describe --always)
GOFLAGS = -ldflags="-X main.Version=$(VERSION) -s -w"
.PHONY: default dependencies rpi_client gpio_client deploy bintray-deploy help
default: help
dependencies:
go get -u github.com/rferrazz/go-selfupdate
raspberrypi_client:
test -n "$(GOOS)" # GOOS
test -n "$(GOARCH)" # GOARCH
go build -tags platform_raspberrypi $(GOFLAGS)
mkdir -p bin/client
mv client bin/client/$(GOOS)-$(GOARCH)
unipi_client:
test -n "$(GOOS)" # GOOS
test -n "$(GOARCH)" # GOARCH
go build -tags platform_unipi_neuron $(GOFLAGS)
mkdir -p bin/client
mv client bin/client/$(GOOS)-$(GOARCH)
soft_client:
test -n "$(GOOS)" # GOOS
test -n "$(GOARCH)" # GOARCH
go build -tags platform_soft $(GOFLAGS)
mkdir -p bin/client
mv client bin/client/$(GOOS)-$(GOARCH)
deploy:
GOOS=linux GOARCH=arm GOARM=6 make raspberrypi_client
GOOS=linux GOARCH=mipsle make raspberrypi_client
GOOS=darwin GOARCH=amd64 make soft_client
GOOS=linux GOARCH=amd64 make soft_client
bintray-deploy:
deploy
mkdir -p release/client
rm -rf release/client/*
@JFROG_CLI_OFFER_CONFIG=false jfrog bt dlv --user=rferrazz --key=$(BINTRAY_API_KEY) rferrazz/IO-Something/client/rolling release/
go-selfupdate -o release/client bin/client $(VERSION)
cd release && JFROG_CLI_OFFER_CONFIG=false jfrog bt u --user=rferrazz --key=$(BINTRAY_API_KEY) --override=true --flat=false --publish=true client/ rferrazz/IO-Something/client/rolling
clean:
git clean -dfx
help:
@echo "make [ dependencies rpi_client gpio_client deploy bintray-deploy clean ]"