Logo
Explore Help
Sign In
TheArchive/headscale
1
0
Fork 0
You've already forked headscale
mirror of https://github.com/juanfont/headscale.git synced 2025-06-07 16:28:50 +00:00
Code Issues Packages Projects Releases Wiki Activity
headscale/Makefile

25 lines
428 B
Makefile
Raw Normal View History

Add a Makefile with a few targets. The default is 'build'. The build target calls the new version-at-commit.sh script which will automatically populate the version variable inside the Headscale binary. Once we start tagging releases on the git tree, that will come in handy. The Makefile also has a 'test' target (does nothing yet, no tests yet) and a 'dev' target, which runs linters, tests, and finally builds.
2021-04-25 10:21:04 -04:00
# Calculate version
version = $(shell ./scripts/version-at-commit.sh)
build:
go build -ldflags "-s -w -X main.version=$(version)" cmd/headscale/headscale.go
dev: lint test build
test:
Add a very simple test.
2021-04-25 11:24:42 -04:00
@go test -coverprofile=coverage.out ./...
Add a Makefile with a few targets. The default is 'build'. The build target calls the new version-at-commit.sh script which will automatically populate the version variable inside the Headscale binary. Once we start tagging releases on the git tree, that will come in handy. The Makefile also has a 'test' target (does nothing yet, no tests yet) and a 'dev' target, which runs linters, tests, and finally builds.
2021-04-25 10:21:04 -04:00
coverprofile_func:
go tool cover -func=coverage.out
coverprofile_html:
go tool cover -html=coverage.out
lint:
golint
golangci-lint run
compress: build
upx --brute cmd/headscale/headscale
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 75ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API