Skip to content
Snippets Groups Projects
Unverified Commit bb09bb6f authored by Neil Pankey's avatar Neil Pankey Committed by GitHub
Browse files

Merge pull request #10 from zendril/issue-7-small-makefile-updates

Issue 7 small makefile updates
parents 4ab3c311 99ea8ea6
Branches
Tags
No related merge requests found
......@@ -14,6 +14,7 @@ jobs:
with:
path: ./src/github.com/neilpa/yajsv
- name: Build
run: go build -v ./...
- name: Test
run: go test ./...
run: make ci
- name: List Files
shell: bash
run: ls -altr
ARCH := darwin/amd64 linux/386 linux/amd64 windows/386 windows/amd64
VERSION := $(shell git describe --always --dirty)
LDFLAGS := -ldflags "-X main.version=${VERSION}"
BUILD_DIR := build
yajsv: *.go
.PHONY: build
build: *.go
go build ${LDFLAGS}
.PHONY: release
release: *.go
gox -output 'build/{{.Dir}}.{{.OS}}.{{.Arch}}' -osarch "${ARCH}" ${LDFLAGS}
gox -output '${BUILD_DIR}/{{.Dir}}.{{.OS}}.{{.Arch}}' -osarch "${ARCH}" ${LDFLAGS}
.PHONY: clean
clean:
rm -rf build yajsv
rm -rf ${BUILD_DIR} yajsv yajsv.exe coverage.out
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: tidy
tidy:
go mod tidy -v
.PHONY: test
test:
go test -coverprofile=coverage.out ./...
.PHONY: ci
ci: clean test build
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment