17 lines
		
	
	
		
			451 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			451 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| # Infer VERSION from the most recent tag; if none, use short commit hash.
 | |
| VERSION ?= $(shell git describe --tags --abbrev=0 2>/dev/null || \
 | |
|                      git rev-parse --short HEAD)
 | |
| 
 | |
| GOLDFLAGS += -s -w \
 | |
| 	-X 'git.eeqj.de/sneak/sysinfo/internal/sysinfo.Version=$(VERSION)'
 | |
| 
 | |
| all: build
 | |
| 
 | |
| build:
 | |
| 	GOFLAGS=-ldflags="$(GOLDFLAGS)" go build ./cmd/sysinfo
 | |
| 
 | |
| install:
 | |
| 	GOFLAGS=-ldflags="$(GOLDFLAGS)" go install ./cmd/sysinfo
 | |
| 
 | |
| .PHONY: all build install
 |