-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
73 lines (51 loc) · 1.29 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# see: https://github.com/news-maily/app/blob/master/Makefile
.PHONY: build
ifneq ($(shell uname), Darwin)
EXTLDFLAGS = -extldflags "-static" $(null)
else
EXTLDFLAGS =
endif
OS_NAME := $(shell uname -s | tr A-Z a-z)
os:
@echo $(OS_NAME)
PACKAGES = $(shell go list ./... | grep -v /vendor/)
gen: gen_migrations
gen_migrations:
#go generate github.com/news-maily/app/storage/migrations
test:
#go test -cover $(PACKAGES)
bootstrap:
ifeq ($(OS),Windows_NT)
# install
scoop install docker
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
# linux
#apt install libglfw
endif
ifeq ($(UNAME_S),Darwin)
# run bash
cd mac && ./bootstrap.bash
endif
endif
tools:
go build -o ./bootstrap main.go
build: build_go
build_go:
mkdir -p bin
cd $(PWD)/example/go/hello && $(MAKE) all
cd $(PWD)/example/go/embedcloud && $(MAKE) all
cd $(PWD)/example/go/screenshot && $(MAKE) all
cd $(PWD)/example/go/glfw && $(MAKE) all
#go build -o bin/app .
#go build -o bin/bulksender ./consumers/bulksender
#go build -o bin/campaigner ./consumers/campaigner
build-flutter:
cd $(PWD)/example/flutter/go-flutter-desktop/examples && $(MAKE) all
build_static:
cd dashboard; yarn && yarn build
mkdir -p static
cp -r dashboard/build static/dashboard
image:
docker build -t news-maily/app:latest .