gomicsv/Makefile

36 lines
759 B
Makefile
Raw Normal View History

2023-02-04 17:13:57 +00:00
# --- PREAMBLE
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
MAKEFLAGS += --warn-undefined-variables
2022-07-10 12:34:22 +00:00
BUILD_DATE := $(shell date +'%Y%m%d')
VERSION := $(shell support/get-version.sh)
build:
go build -o target/gomicsv \
2023-02-04 17:13:57 +00:00
-ldflags="-X main.buildDate=$(BUILD_DATE) -X main.versionString=$(VERSION)" \
cmd/gomicsv/main.go
.PHONY: build
2022-07-10 12:34:22 +00:00
clean:
2023-02-04 17:13:57 +00:00
rm -rf target/
.PHONY: clean
2022-07-10 12:34:22 +00:00
dist: build
2023-02-04 17:13:57 +00:00
rm -rf target/dist
rm -rf target/*.zip
mkdir -p target/dist/gomicsv
cp target/gomicsv target/dist/gomicsv/gomicsv
cp README.md target/dist/gomicsv
cp COPYING.md target/dist/gomicsv
cp CHANGELOG.md target/dist/gomicsv
pushd target/dist
zip -r ../Gomics-v_$(VERSION).zip gomicsv
rm -rf gomicsv
.PHONY: dist
2023-02-04 17:44:28 +00:00
lint:
golangci-lint run
.PHONY: lint