Makefile raw

   1  .PHONY: clean check test build
   2  
   3  export GO111MODULE=on
   4  
   5  default: clean check test build
   6  
   7  clean:
   8  	rm -rf cover.out
   9  
  10  build: clean
  11  	 go build -v .
  12  
  13  test: clean
  14  	go test -v -cover ./...
  15  
  16  check:
  17  	golangci-lint run
  18  
  19  ## Useful to initiate structures
  20  # TODO: must be updated to support the subfolders.
  21  #gen-struct:
  22  #	# go install github.com/miku/zek/cmd/zek@latest
  23  #	echo 'package namesilo' > "gen_struct.go";
  24  #	echo '' >> "gen_struct.go";
  25  #	echo 'import "encoding/xml"' >> "gen_struct.go";
  26  #	echo '' >> "gen_struct.go";
  27  #	for i in $$(ls samples/ -1); do \
  28  #		zek -c -n $${i%.xml} "./samples/$$i" >> "gen_struct.go"; \
  29  #	done
  30  
  31  generate:
  32  	go run ./internal/
  33