-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile, Makefile and travis configuration. (#8)
* Add Dockerfile. There was also a missing dependency when I tried to build the project, so I added it. Signed-off-by: David Calavera <david.calavera@gmail.com> * Add Makefile and travis configuration. Signed-off-by: David Calavera <david.calavera@gmail.com> * Use make to build the binary. Signed-off-by: David Calavera <david.calavera@gmail.com> * Do not require sudo on travis. Signed-off-by: David Calavera <david.calavera@gmail.com> * Install dependencies in the install phase. Signed-off-by: David Calavera <david.calavera@gmail.com> * Skip vendor from tests. Signed-off-by: David Calavera <david.calavera@gmail.com>
- Loading branch information
Showing
5 changed files
with
90 additions
and
29 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,8 @@ | ||
--- | ||
language: go | ||
|
||
go: | ||
- 1.7 | ||
|
||
install: make deps | ||
script: make all |
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,7 @@ | ||
FROM calavera/go-glide:v0.12.2 | ||
|
||
ADD . /go/src/github.com/netlify/gocommerce | ||
|
||
RUN cd /go/src/github.com/netlify/gocommerce && make deps build && mv gocommerce /usr/local/bin/ | ||
|
||
CMD ["gocommerce"] |
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,18 @@ | ||
.PONY: all build deps image test | ||
|
||
help: ## Show this help. | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
all: test build ## Run the tests and build the binary. | ||
|
||
build: ## Build the binary. | ||
go build | ||
|
||
deps: ## Install dependencies. | ||
go get -u github.com/Masterminds/glide && glide install | ||
|
||
image: ## Build the Docker image. | ||
docker build . | ||
|
||
test: ## Run tests. | ||
go test -v $(go list ./... | grep -v /vendor/) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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