diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-04-01 06:28:48 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-04-01 06:28:48 +0700 |
| commit | 9613122cf6b0f315b6071704b60ab902906362b1 (patch) | |
| tree | 59c3a25eaa0b43fc1d735548e92b5b738cd24365 | |
| parent | 8a141995aabdee289d2b096bd77a10b52b08a1bf (diff) | |
| download | kamusku-9613122cf6b0f315b6071704b60ab902906362b1.tar.xz | |
Makefile: add deploy task
The deploy task build the specific binary for server OS and architecture
and copy them to server.
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -3,3 +3,5 @@ /kbbi /testdata/kamus.gob /testdata/kamus.gob.new +/www-kbbi +/www-kbbi-linux-amd64 @@ -2,7 +2,7 @@ ## Use of this source code is governed by a BSD-style ## license that can be found in the LICENSE file. -.PHONY: all build lint test +.PHONY: all build lint test install deploy LINT_OPTS = @@ -23,3 +23,11 @@ lint: test: go test ./... + +install: + go install ./cmd/kbbi/ + +deploy: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ + go build -o www-kbbi-linux-amd64 ./cmd/www-kbbi/ + rsync --progress ./www-kbbi-linux-amd64 www-kbbi:~/bin/www-kbbi |
