Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Add snapshot build task
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Watters committed May 23, 2020
1 parent 214f1d0 commit d999068
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ $(warning "could not find richgo in $(PATH), run: go get -u github.com/kyoh86/ri
TEST_RUNNER="go"
endif

.PHONY: build run fmt vet test deps clean license
.PHONY: build run fmt vet test deps clean license snapshot test_integration test_unit

default: all

all: fmt vet test build

build: deps
$(info ******************** building cli ********************)
pkger
go build -o $(BIN)/opsani main.go

run:
Expand All @@ -28,17 +29,14 @@ fmt:
$(info ******************** checking formatting ********************)
@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)

.PHONY: test_unit
test_unit:
$(info ******************** running unit tests ********************)
$(TEST_RUNNER) test -v ./command/... ./opsani/...

.PHONY: test_integration
test_integration:
$(info ******************** running integration tests ********************)
$(TEST_RUNNER) test -v ./integration/...

.PHONY: test
test: test_unit test_integration

deps:
Expand All @@ -63,3 +61,6 @@ completion:
license:
$(info ******************** licensing ********************)
addlicense -c "Opsani" -l apache -v Dockerfile *.go ./**/*.go

snapshot:
goreleaser --snapshot --skip-publish --rm-dist

0 comments on commit d999068

Please sign in to comment.