-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
48 lines (35 loc) · 932 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
40
41
42
43
44
45
46
47
48
.PHONY: help run build build_pkgs install clean
SLACK_TOKEN ?= xoxb-19232920311-vb7KYcw8EpdfcN9Qz3v7cWpl
help:
@echo "run: Run code in dev mode."
@echo "build: Build code."
# @echo "test: Run tests."
@echo "install: Install binary."
@echo "clean: Clean up."
run:
@(cd ./cmd/supbot && \
fresh -c ../../etc/fresh-runner.conf -w=../..)
build: build_pkgs
@mkdir -p ./bin
@rm -f ./bin/*
go build -o ./bin/supbot ./cmd/supbot
build_pkgs:
go build ./...
#test:
# go test
install: build
go install ./...
clean:
@rm -rf ./bin
deps:
@glock sync -n github.com/gophergala2016/supbot < Glockfile
update_deps:
@glock save -n github.com/gophergala2016/supbot > Glockfile
docker:
docker build -t supbot .
docker-run:
(docker stop supbot &> /dev/null || exit 0) && \
(docker rm supbot &> /dev/null || exit 0) && \
docker run -i -e SLACK_TOKEN=$(SLACK_TOKEN) --name supbot -t supbot
deploy:
sup prod deploy