-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
41 lines (33 loc) · 1.36 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
29
30
31
32
33
34
35
36
37
38
39
40
41
CD = $(shell pwd)
VER = $(shell git describe --tags)
all: compiler build
fix-permission:
sudo chown -fR $(shell whoami) dist/* || :
sudo chown -fR $(shell whoami) release-builds/* || :
sudo chown -fR $(shell whoami) gui/* || :
compiler:
cd ./docker && docker build -t weatherdump_linux_x64 -f Dockerfile.linux_x64 .
cd ./docker && docker build -t weatherdump_linux_armv7l -f Dockerfile.linux_armv7l .
cd ./docker && docker build -t weatherdump_linux_armv6 -f Dockerfile.linux_armv6 .
cd ./docker && docker build -t weatherdump_win_x64 -f Dockerfile.win_x64 .
cd ./docker && docker build -t weatherdump_mac_x64 -f Dockerfile.mac_x64 .
build:
mkdir -p release-builds ./dist
rm -fr ./release-builds/weatherdump-cli-* ./dist/*
docker run -v $(CD):/home/go/src/weather-dump weatherdump_linux_x64
docker run -v $(CD):/home/go/src/weather-dump weatherdump_linux_armv7l
docker run -v $(CD):/home/go/src/weather-dump weatherdump_linux_armv6
docker run -v $(CD):/home/go/src/weather-dump weatherdump_win_x64
docker run -v $(CD):/home/go/src/weather-dump weatherdump_mac_x64
make fix-permission
mv ./dist/export/* ./release-builds
rm -fr ./dist/export
release:
ghr -n $(VER) $(VER) ./release-builds
prerelease:
ghr -prerelease -n $(VER) $(VER) ./release-builds
draft:
ghr -draft -n $(VER) $(VER) ./release-builds
clean:
make fix-permission
rm -rf ./dist ./release-builds