-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
334 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
APP = shp | ||
OUTPUT_DIR ?= _output | ||
|
||
CMD = ./cmd/$(APP)/... | ||
PKG = ./pkg/... | ||
|
||
BIN ?= $(OUTPUT_DIR)/$(APP) | ||
|
||
GO_FLAGS ?= -v -mod=vendor | ||
GO_TEST_FLAGS ?= -race -cover | ||
|
||
ARGS ?= | ||
|
||
default: $(BIN) | ||
|
||
.PHONY: $(BIN) | ||
$(BIN): | ||
go build $(GO_FLAGS) -o $(BIN) $(CMD) | ||
|
||
# Creates the application binary under output directory. | ||
# | ||
# make build | ||
build: $(BIN) | ||
|
||
# Executes the application main binary from source-code with "go run". It takes "ARGS" as the | ||
# command-line direct arguments. | ||
# | ||
# make run ARGS='--help' | ||
run: | ||
go run $(GO_FLAGS) $(CMD) $(ARGS) | ||
|
||
# Single target to run all tests. | ||
# | ||
# make test | ||
test: test-unit | ||
|
||
# Execute unit-tests. | ||
# | ||
# make test-unit | ||
.PHONY: test-unit | ||
test-unit: | ||
go test $(GO_FLAGS) $(GO_TEST_FLAGS) $(CMD) $(PKG) $(ARGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/shipwright-io/cli | ||
|
||
go 1.15 | ||
|
||
require github.com/spf13/cobra v1.1.1 |
Oops, something went wrong.