-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (54 loc) · 1.59 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
.PHONY: build clean deploy gomodgen
.DEFAULT_GOAL := default
default: clean build deploy-dev test-dev
prod: default deploy-prod test-prod
build: gomodgen
@echo ========================================
@echo Building
@echo ========================================
export GO111MODULE=on
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/hello hello/main.go
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/v1 v1/*.go
ls -lah bin
sha256sum bin/*
clean:
@echo ========================================
@echo Cleaning
@echo ========================================
rm -rf ./bin ./vendor Gopkg.lock
deploy: deploy-dev
deploy-dev:
@echo ========================================
@echo Deploying to Dev
@echo ========================================
sls deploy --verbose
test: test-dev
test-dev:
@echo ========================================
@echo Running Dev Tests
@echo ========================================
@./test.sh
deploy-prod:
@echo ========================================
@echo Deploying to Prod
@echo ========================================
sls deploy --verbose --stage=prod
test-prod:
@echo ========================================
@echo Running Prod Tests
@echo ========================================
@API_PATH=https://api.lmhd.me ./test.sh
gomodgen:
@echo ========================================
@echo GoModGen
@echo ========================================
chmod u+x gomod.sh
./gomod.sh
# Install Dependencies
deps:
ifeq ($(shell uname -s),Darwin)
brew install node@14
brew link --overwrite node@14
endif
npm i -g [email protected]
npm install