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'
|
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
||||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
||||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
@ -23,7 +22,7 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- task: build-windows
|
- task: build-windows
|
||||||
- task: build-linux
|
- task: build-linux
|
||||||
- task: build-macos
|
|
||||||
vet:
|
vet:
|
||||||
desc: Vet the code
|
desc: Vet the code
|
||||||
deps: [fmt]
|
deps: [fmt]
|
||||||
@ -39,19 +38,11 @@ tasks:
|
|||||||
desc: Build the vbantxt project for Windows
|
desc: Build the vbantxt project for Windows
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
||||||
internal: true
|
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
desc: Build the vbantxt project for Linux
|
desc: Build the vbantxt project for Linux
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}/
|
- 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:
|
test:
|
||||||
desc: Run tests
|
desc: Run tests
|
||||||
|
|||||||
10
makefile
10
makefile
@ -5,27 +5,24 @@ BIN_DIR := bin
|
|||||||
|
|
||||||
WINDOWS=$(BIN_DIR)/$(PROGRAM)_windows_amd64.exe
|
WINDOWS=$(BIN_DIR)/$(PROGRAM)_windows_amd64.exe
|
||||||
LINUX=$(BIN_DIR)/$(PROGRAM)_linux_amd64
|
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))
|
VERSION=$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
|
||||||
|
|
||||||
.DEFAULT_GOAL := build
|
.DEFAULT_GOAL := build
|
||||||
|
|
||||||
.PHONY: fmt vet build windows linux macos test clean
|
.PHONY: fmt vet build windows linux test clean
|
||||||
fmt:
|
fmt:
|
||||||
$(GO) fmt ./...
|
$(GO) fmt ./...
|
||||||
|
|
||||||
vet: fmt
|
vet: fmt
|
||||||
$(GO) vet ./...
|
$(GO) vet ./...
|
||||||
|
|
||||||
build: vet windows linux macos | $(BIN_DIR)
|
build: vet windows linux | $(BIN_DIR)
|
||||||
@echo version: $(VERSION)
|
@echo version: $(VERSION)
|
||||||
|
|
||||||
windows: $(WINDOWS)
|
windows: $(WINDOWS)
|
||||||
|
|
||||||
linux: $(LINUX)
|
linux: $(LINUX)
|
||||||
|
|
||||||
macos: $(MACOS)
|
|
||||||
|
|
||||||
|
|
||||||
$(WINDOWS):
|
$(WINDOWS):
|
||||||
env GOOS=windows GOARCH=amd64 go build -v -o $(WINDOWS) -ldflags="-s -w -X main.version=$(VERSION)" ./cmd/$(PROGRAM)/
|
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):
|
$(LINUX):
|
||||||
env GOOS=linux GOARCH=amd64 go build -v -o $(LINUX) -ldflags="-s -w -X main.version=$(VERSION)" ./cmd/$(PROGRAM)/
|
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:
|
test:
|
||||||
$(GO) test ./...
|
$(GO) test ./...
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user