diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-22 14:57:20 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-22 14:57:20 +0700 |
| commit | fbad5db9b998ca64feaffee78ba680300d3a52a6 (patch) | |
| tree | 1d8a9cd8bba88bf8daf64f5037fef9b110644f10 | |
| parent | b20dc5c85b418b7167b3fb7866c7ea9a9fa0a705 (diff) | |
| download | lilin-fbad5db9b998ca64feaffee78ba680300d3a52a6.tar.xz | |
Makefile: add task for build and deploy to internal kilabit
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | lilin.go | 2 |
2 files changed, 15 insertions, 1 deletions
@@ -1,9 +1,18 @@ ## SPDX-License-Identifier: GPL-3.0-only ## SPDX-FileCopyrightText: 2025 M. Shulhan <ms@kilabit.info> +VERSION=$(shell git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g') + .PHONY: all all: lint test +.PHONY: build +build: LD_FLAGS+=-X 'git.sr.ht/~shulhan/lilin.Version=$(VERSION)' +build: + go build \ + -ldflags="$(LD_FLAGS)" \ + ./cmd/lilin/ + .PHONY: lint lint: go vet ./... @@ -28,3 +37,8 @@ dev.test: .PHONY: serve.docs serve.docs: ciigo serve _www/doc + +.PHONY: deploy.kilabit +deploy.kilabit: build + rsync lilin lilin.kilabit.internal:~/bin/lilin + ssh lilin.kilabit.internal "sudo systemctl restart lilin.service" @@ -9,7 +9,7 @@ import ( ) // Version latest released version. -const Version = `0.2.0` +var Version = `0.2.0` // defTimeout define default timeout for service and client connection. const defTimeout = 5 * time.Second |
