replaced Makefile with .travis.yml

This commit is contained in:
Mahmoud Rahbar Azad 2018-10-25 21:47:43 +02:00
parent 5d5c779b43
commit ddb4f49cf7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 7DBBD39E2BFEB784
2 changed files with 27 additions and 44 deletions

27
.travis.yml Normal file
View file

@ -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}}"

View file

@ -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)