-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from davidovich/add-scaffolding
Add scaffolding
- Loading branch information
Showing
19 changed files
with
519 additions
and
443 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 |
---|---|---|
|
@@ -12,4 +12,4 @@ jobs: | |
steps: | ||
- checkout | ||
|
||
- run: go test -cover -v ./... | ||
- run: make |
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 @@ | ||
bin |
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,32 @@ | ||
SHELL=/bin/bash | ||
|
||
HAS_PACKR2 := $(shell command -v packr2) | ||
|
||
export GO111MODULE := on | ||
|
||
SCAFFOLD_BIN := bin/scaffold | ||
PACKR_FILE := pkg/scaffold/scaffold-packr.go | ||
|
||
ASSETS := $(shell find templates/scaffold) | ||
|
||
all: test $(PACK_FILE) $(SCAFFOLD_BIN) | ||
|
||
.PHONY: $(SCAFFOLD_BIN) | ||
$(SCAFFOLD_BIN): $(PACKR_FILE) | ||
@mkdir -p bin | ||
go build -o $@ $(@F)/$(@F).go | ||
|
||
$(PACKR_FILE): $(ASSETS) | ||
ifndef HAS_PACKR2 | ||
go get -u github.com/gobuffalo/packr/v2/packr2 | ||
endif | ||
packr2 | ||
|
||
.PHONY: test | ||
test: | ||
go test -cover -v ./... | ||
|
||
.PHONY: clean | ||
clean: | ||
packr2 clean | ||
rm -r bin |
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
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 |
---|---|---|
@@ -1,21 +1,13 @@ | ||
module github.com/davidovich/summon | ||
|
||
require ( | ||
github.com/gobuffalo/buffalo-plugins v1.13.0 // indirect | ||
github.com/gobuffalo/envy v1.6.15 // indirect | ||
github.com/gobuffalo/flect v0.1.0 // indirect | ||
github.com/gobuffalo/meta v0.0.0-20190207205153-50a99e08b8cf // indirect | ||
github.com/gobuffalo/packr/v2 v2.0.1 | ||
github.com/gobuffalo/packr/v2 v2.0.7 | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/lithammer/dedent v1.1.0 | ||
github.com/pkg/errors v0.8.1 | ||
github.com/rogpeppe/go-internal v1.2.1 // indirect | ||
github.com/spf13/afero v1.2.1 | ||
github.com/spf13/cobra v0.0.3 | ||
github.com/spf13/pflag v1.0.3 // indirect | ||
github.com/stretchr/testify v1.3.0 | ||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 // indirect | ||
golang.org/x/sys v0.0.0-20190213121743-983097b1a8a3 // indirect | ||
golang.org/x/tools v0.0.0-20190213042836-0e66cc6fab8b // indirect | ||
gopkg.in/yaml.v2 v2.2.2 | ||
) | ||
|
||
// replace github.com/gobuffalo/packr/v2 => ../github.com/gobuffalo/packr/v2 |
Oops, something went wrong.