Skip to content

Commit

Permalink
Initial commit of nomad-toast
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Oct 26, 2018
0 parents commit 04e2c27
Show file tree
Hide file tree
Showing 936 changed files with 385,182 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
@@ -0,0 +1,9 @@
# Goreleaser directory
/dist/

# Local builds directory
/bin/

# Goland/IntelliJ
/.idea/
*.iml
12 changes: 12 additions & 0 deletions .travis.yml
@@ -0,0 +1,12 @@
sudo: false
dist: trusty
language: go
go:
- "1.11"
script:
- make tools
- make
after_success:
- if [[ -n "$TRAVIS_TAG" ]]; then make release; fi
notifications:
email: true
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,3 @@
## 0.0.1 (Unreleased)

- Initial release.
21 changes: 21 additions & 0 deletions Dockerfile
@@ -0,0 +1,21 @@
FROM alpine:latest

LABEL maintainer James Rasell<(jamesrasell@gmail.com)> (@jrasell)
LABEL vendor "jrasell"

ENV NOMAD_TOAST_VERSION 0.0.1

WORKDIR /usr/bin/

RUN buildDeps=' \
bash \
wget \
' \
set -x \
&& apk --no-cache add $buildDeps ca-certificates \
&& wget -O levant https://github.com/jrasell/nomad-toast/releases/download/${NOMAD_TOAST_VERSION}/nomad-toast_linux_amd64 \
&& chmod +x /usr/bin/nomad-toast \
&& apk del $buildDeps \
&& echo "Build complete."

CMD ["nomad-toast", "--help"]
52 changes: 52 additions & 0 deletions GNUmakefile
@@ -0,0 +1,52 @@
default: check test build

tools: ## Install the tools used to test and build
@echo "==> Installing build tools"
go get github.com/ahmetb/govvv
go get github.com/alecthomas/gometalinter
go get github.com/goreleaser/goreleaser
gometalinter --install

build: ## Build Levant for development purposes
@echo "==> Running $@..."
govvv build -o ./bin/nomad-toast ./cmd/nomad-toast -version local

test: ## Run the Levant test suite with coverage
@echo "==> Running $@..."
@go test -cover -v -tags -race \
"$(BUILDTAGS)" $(shell go list ./... | grep -v vendor)

release: ## Trigger the release build script
@echo "==> Running $@..."
@goreleaser --rm-dist --config=./cmd/nomad-toast/goreleaser.yml

.PHONY: check
check: ## Run the gometalinter suite
@echo "==> Running $@..."
gometalinter \
--deadline 10m \
--vendor \
--sort="path" \
--aggregate \
--disable-all \
--enable golint \
--enable-gc \
--enable goimports \
--enable misspell \
--enable vet \
--enable deadcode \
--enable varcheck \
--enable ineffassign \
--enable structcheck \
--enable errcheck \
--enable gofmt \
./...

HELP_FORMAT=" \033[36m%-25s\033[0m %s\n"
.PHONY: help
help: ## Display this usage information
@echo "Levant make commands:"
@grep -E '^[^ ]+:.*?## .*$$' $(MAKEFILE_LIST) | \
sort | \
awk 'BEGIN {FS = ":.*?## "}; \
{printf $(HELP_FORMAT), $$1, $$2}'

0 comments on commit 04e2c27

Please sign in to comment.