mirror of
https://github.com/onyx-and-iris/vbantxt.git
synced 2026-02-15 08:57:51 +00:00
Compare commits
No commits in common. "main" and "v0.6.0" have entirely different histories.
11
Taskfile.yml
11
Taskfile.yml
@ -9,7 +9,6 @@ vars:
|
||||
|
||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
@ -23,7 +22,7 @@ tasks:
|
||||
cmds:
|
||||
- task: build-windows
|
||||
- task: build-linux
|
||||
- task: build-macos
|
||||
|
||||
vet:
|
||||
desc: Vet the code
|
||||
deps: [fmt]
|
||||
@ -39,19 +38,11 @@ tasks:
|
||||
desc: Build the vbantxt project for Windows
|
||||
cmds:
|
||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
||||
internal: true
|
||||
|
||||
build-linux:
|
||||
desc: Build the vbantxt project for Linux
|
||||
cmds:
|
||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
||||
internal: true
|
||||
|
||||
build-macos:
|
||||
desc: Build the vbantxt project for macOS
|
||||
cmds:
|
||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
||||
internal: true
|
||||
|
||||
test:
|
||||
desc: Run tests
|
||||
|
||||
10
makefile
10
makefile
@ -5,27 +5,24 @@ BIN_DIR := bin
|
||||
|
||||
WINDOWS=$(BIN_DIR)/$(PROGRAM)_windows_amd64.exe
|
||||
LINUX=$(BIN_DIR)/$(PROGRAM)_linux_amd64
|
||||
MACOS=$(BIN_DIR)/$(PROGRAM)_darwin_amd64
|
||||
VERSION=$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
|
||||
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
.PHONY: fmt vet build windows linux macos test clean
|
||||
.PHONY: fmt vet build windows linux test clean
|
||||
fmt:
|
||||
$(GO) fmt ./...
|
||||
|
||||
vet: fmt
|
||||
$(GO) vet ./...
|
||||
|
||||
build: vet windows linux macos | $(BIN_DIR)
|
||||
build: vet windows linux | $(BIN_DIR)
|
||||
@echo version: $(VERSION)
|
||||
|
||||
windows: $(WINDOWS)
|
||||
|
||||
linux: $(LINUX)
|
||||
|
||||
macos: $(MACOS)
|
||||
|
||||
|
||||
$(WINDOWS):
|
||||
env GOOS=windows GOARCH=amd64 go build -v -o $(WINDOWS) -ldflags="-s -w -X main.version=$(VERSION)" ./cmd/$(PROGRAM)/
|
||||
@ -33,9 +30,6 @@ $(WINDOWS):
|
||||
$(LINUX):
|
||||
env GOOS=linux GOARCH=amd64 go build -v -o $(LINUX) -ldflags="-s -w -X main.version=$(VERSION)" ./cmd/$(PROGRAM)/
|
||||
|
||||
$(MACOS):
|
||||
env GOOS=darwin GOARCH=amd64 go build -v -o $(MACOS) -ldflags="-s -w -X main.version=$(VERSION)" ./cmd/$(PROGRAM)/
|
||||
|
||||
test:
|
||||
$(GO) test ./...
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user