From ddb4f49cf786269747ced9bbcad5a38d27c596e5 Mon Sep 17 00:00:00 2001 From: Mahmoud Rahbar Azad Date: Thu, 25 Oct 2018 21:47:43 +0200 Subject: [PATCH] replaced Makefile with .travis.yml --- .travis.yml | 27 +++++++++++++++++++++++++++ Makefile | 44 -------------------------------------------- 2 files changed, 27 insertions(+), 44 deletions(-) create mode 100644 .travis.yml delete mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1339ed5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +language: go + +# Force-enable Go modules. This will be unnecessary when Go 1.12 lands. +env: +- GO111MODULE=on + +# You don't need to test on very old version of the Go compiler. It's the user's +# responsibility to keep their compilers up to date. +go: +- 1.11.x + +# Only clone the most recent commit. +git: + depth: 1 + +# Skip the install step. Don't `go get` dependencies. Only build with the code +# in vendor/ +install: true + +notifications: + email: false + +before_script: +- go install -mod vendor github.com/mitchellh/gox + +script: +- gox -output="hetzner-sb-notifier_{{.OS}}_{{.Arch}}" \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 9118e01..0000000 --- a/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SHELL := /bin/bash - -TARGET := hetzner-sb-notifier -.DEFAULT_GOAL: $(TARGET) - -# These will be provided to the target -VERSION := 1.0.0 -BUILD := `git rev-parse HEAD` - -.PHONY: all build clean uninstall fmt simplify check run - -all: check build - -$(TARGET): - @go build -o $(TARGET) - -build: $(TARGET) - @true - -clean: - @echo "Performing clean" - @rm -f $(TARGET) - -uninstall: clean - @echo "Performing uninstall" - @rm -f $$(which ${TARGET}) - -fmt: - @echo "Performing fmt" - @gofmt -l -w . - -simplify: - @echo "Performing simplify" - @gofmt -s -l -w . - -check: - @echo "Performing check" - @test -z $(shell gofmt -l main.go | tee /dev/stderr) || echo "[WARN] Fix formatting issues with 'make fmt'" - @for d in $$(go list ./...); do golint $${d}; done - @go tool vet . - -run: install - @echo "Performing run" - @$(TARGET) \ No newline at end of file