This repository has been archived on 2021-09-02. You can view files and clone it, but cannot push or open issues or pull requests.
my-bloody-hetzner-sb-notifier/Makefile

44 lines
835 B
Makefile
Raw Normal View History

2018-10-25 21:18:45 +02:00
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)