Procházet zdrojové kódy

Initial commit & develop creation

gremlin před 3 roky
rodič
revize
cb67b16203
2 změnil soubory, kde provedl 47 přidání a 0 odebrání
  1. 3 0
      go.mod
  2. 44 0
      makefile

+ 3 - 0
go.mod

@@ -0,0 +1,3 @@
+module git.riomhaire.com/gremlin/golti13platform
+
+go 1.16

+ 44 - 0
makefile

@@ -0,0 +1,44 @@
+.DEFAULT_GOAL := everything
+V="v1.0.$(shell date +%Y%m%d%H%M%S)"
+
+
+dependencies:
+	@echo Downloading Dependencies
+	@go get ./...
+
+build: dependencies
+	@echo Compiling Apps
+	@echo   --- golti $(V)
+	@go build -o golti -ldflags="-s -w -X git.riomhaire.com/gremlin/golti13platform/infrastructure/application/cmd.version=$(V) -X git.riomhaire.com/gremlin/golti13platform/infrastructure/application/cmd.builtBy=$(USERNAME) " git.riomhaire.com/gremlin/golti13platform/infrastructure/application
+	@upx  golti
+	@cp golti ${GOPATH}/bin
+	@echo Done Compiling Apps
+
+build-arm: dependencies
+	@echo Compiling Apps
+	@echo   --- golti arm version
+	@GOOS=linux GOARCH=arm GOARM=5  go build -o golti-arm -ldflags="-s -w -X git.riomhaire.com/gremlin/golti13platform/infrastructure/application/cmd.version=$(V) -X git.riomhaire.com/gremlin/golti13platform/infrastructure/application/cmd.builtBy=$(USERNAME) " git.riomhaire.com/gremlin/golti13platform/infrastructure/application
+	@upx  -9 golti-arm
+	@echo Done Compiling Apps
+
+test:
+	@echo Running Unit Tests
+	@go test ./...
+
+profile:
+	@echo Profiling Code
+	@go get -u github.com/haya14busa/goverage 
+	@goverage -v -coverprofile=coverage.out ./...
+	@go tool cover -html=coverage.out -o coverage.html
+	@rm coverage.out
+
+clean:
+	@echo Cleaning
+	@go clean
+	@rm -f golti
+	@rm -f golti-arm
+	@rm -f coverage*.html
+	@find . -name "debug.test" -exec rm -f {} \;
+
+everything: clean build test
+	@echo Done