-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 836 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
32
33
34
35
36
37
38
39
build: ensure-dir build-linux build-windows build-darwin compress
ensure-dir:
rm -rf bin
mkdir bin
build-linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/mynews.linux-amd64 cmd/mynews/*.go
build-windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o bin/mynews.windows-amd64.exe cmd/mynews/*.go
build-darwin:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o bin/mynews.darwin-amd-64 cmd/mynews/*.go
compress:
cd ./bin && find . -name 'mynews*' | xargs -I{} tar czf {}.tar.gz {}
snap-clean:
rm -f mynews_*_amd64.snap*
snapcraft clean mynews
snap-build:
snapcraft
snap-install:
snap install mynews*.snap --dangerous
snap-publish:
snapcraft push --release=edge mynews_*_amd64.snap
docker-build:
docker build -t mynews:local .
docker-run:
docker run mynews:local
compose-run:
docker-compose up