mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
Adjust the Makefile for the conversion to a Go module.
This commit is contained in:
parent
774dee6012
commit
81e49a31c3
1 changed files with 6 additions and 12 deletions
18
Makefile
18
Makefile
|
@ -1,30 +1,24 @@
|
|||
GOPATH=$(shell pwd)/vendor:$(shell pwd)
|
||||
GOBIN=$(shell pwd)/bin
|
||||
GOFILES=$(wildcard *.go)
|
||||
GONAME=$(shell basename "$(PWD)")
|
||||
|
||||
build: get
|
||||
@echo "Building $(GOFILES) to ./bin"
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -v -o bin/$(GONAME) $(GOFILES)
|
||||
@go build -v
|
||||
|
||||
get:
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go get -v .
|
||||
@go get -v
|
||||
|
||||
install:
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go install $(GOFILES)
|
||||
@go install
|
||||
|
||||
run: build
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go run $(GOFILES) --config=$(shell pwd)/smartctl_exporter.yaml --debug --verbose
|
||||
@go run . --config=$(shell pwd)/smartctl_exporter.yaml --debug --verbose
|
||||
|
||||
run-sudo: build
|
||||
sudo bin/$(GONAME) --config=$(shell pwd)/smartctl_exporter.yaml --debug --verbose
|
||||
sudo smartctl_exporter --config=$(shell pwd)/smartctl_exporter.yaml --debug --verbose
|
||||
|
||||
clear:
|
||||
@clear
|
||||
|
||||
clean:
|
||||
@echo "Cleaning"
|
||||
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go clean
|
||||
@go clean
|
||||
|
||||
example:
|
||||
@echo "# Example output" > EXAMPLE.md
|
||||
|
|
Loading…
Reference in a new issue