Skip to content
Snippets Groups Projects
Select Git revision
  • eb53d6444de99f2ddaeeffc6a21dee612b78dc3b
  • master default protected
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.17
  • 0.4.16
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
22 results

modules.txt

Blame
  • Makefile 1.07 KiB
    PROJECT_NAME := "connection-checker"
    PKG := "gitlab.schukai.com/oss/utilities/network/connection-checker"
    PKG_LIST := $(shell go list ${PKG}/... )
    GO_FILES := $(shell find . -name '*.go')
    
    GOCMD=go
    GOBUILD=$(GOCMD) build 
    GOCLEAN=$(GOCMD) clean 
    GOTEST=$(GOCMD) test 
    GOVET=$(GOCMD) vet  
    GOGET=$(GOCMD) get 
    GOFMT=$(GOCMD) fmt 
    GODOC=$(GOCMD) fmt 
    GOLINT=golint 
    
    default: help
    
    help:   ## show this help
    	@echo 'usage: make [target] ...'
    	@echo ''
    	@echo 'targets:'
    	@egrep '^(.+)\:\ .*##\ (.+)' ${MAKEFILE_LIST} | sed 's/:.*##/#/' | column -t -c 2 -s '#'
    
    clean:  ## go clean
    	$(GOCLEAN)
    
    clean-all:  ## remove all generated artifacts and clean all build artifacts
    	$(GOCLEAN) -i ./...
    
    lint:   ## run go lint on the source files
    	$(GOLINT) -set_exit_status .
    
    doc:    ## generate godocs and start a local documentation webserver on port 8085
    	godoc -http=:8085 -index
    
    fmt:    ## format the go source files
    	$(GOFMT) .
    
    all:    ## clean, format and build
    	make clean-all
    	make fmt
    	make build
    
    build:
    	mkdir -p bin
    	$(GOCMD) build -o bin/nck 
    
    install: build
    	sudo setcap cap_net_raw+ep bin/nck