You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
obsidian-pipeline/Makefile

38 lines
895 B
Makefile

BINARY_NAME=obp
2 years ago
$DOCKER_CMD="docker --config ~/.docker/"
.PHONY: docker
docker: docker-image docker-push
2 years ago
.PHONY: docker-push
docker-push:
2 years ago
$DOCKER_CMD push code.ndumas.com/ndumas/obsidian-pipeline:latest
2 years ago
.PHONY: docker-image
docker-image:
2 years ago
$DOCKER_CMD build -t code.ndumas.com/ndumas/obsidian-pipeline:latest .
2 years ago
.PHONY: alpine-binary
alpine-binary:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/${BINARY_NAME}-alpine cmd/obp/cmd/*.go
2 years ago
.PHONY: build-all
build-all: alpine-binary
GOOS=darwin GOARCH=amd64 go build -o bin/${BINARY_NAME}-darwin cmd/obp/*.go
GOOS=linux GOARCH=amd64 go build -o bin/${BINARY_NAME}-linux cmd/obp/*.go
GOOS=windows GOARCH=amd64 go build -o bin/${BINARY_NAME}-windows.exe cmd/obp/*.go
2 years ago
.PHONY: clean
clean:
go clean
rm -v bin/*
2 years ago
.PHONY: test
test:
go test ./...
2 years ago
.PHONY: test_coverage
test_coverage:
go test ./... -coverprofile=coverage.out