aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 368c019..b11a118 100644
--- a/Makefile
+++ b/Makefile
@@ -1,32 +1,36 @@
-## Copyright 2020, Shulhan <ms@kilabit.info>. All rights reserved.
-## Use of this source code is governed by a BSD-style
-## license that can be found in the LICENSE file.
+## SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info>
+## SPDX-License-Identifier: GPL-3.0-or-later
-.PHONY: all test check
-.PHONY: build-linux_amd64
-.PHONY: deploy deploy-kamusd deploy-telegram-bot
.PHONY: run-kamusd
BIN_LINUX_AMD64 := _bin/linux_amd64
-all: test check
+.PHONY: all
+all: test lint
+.PHONY: test
test:
CGO_ENABLED=1 go test -race -p=1 ./...
-check:
- golangci-lint run ./...
+.PHONY: lint
+lint:
+ -golangci-lint run ./...
+ -reuse lint
+.PHONY: build-linux_amd64
build-linux_amd64:
mkdir -p $(BIN_LINUX_AMD64)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -o $(BIN_LINUX_AMD64)/ ./cmd/...
+.PHONY: deploy
deploy: build-linux_amd64
+.PHONY: deploy-kamusd
deploy-kamusd:
rsync --progress $(BIN_LINUX_AMD64)/kamusd www-kamusku:~/bin/kamusd
+.PHONY: deploy-telegram-bot
deploy-telegram-bot:
rsync --progress $(BIN_LINUX_AMD64)/kamusku-telegram-bot www-kamusku:~/bin/kamusku-telegram-bot