My Very Own CI-server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

57 lines
1.5 KiB

  1. DISTDIR=dist
  2. RELEASEVERSION=$(shell echo $VERSION)
  3. DEBUGVERSION=$(shell git rev-list -1 HEAD | cut -c 1-10 )
  4. HASH=$(shell git rev-list -1 HEAD)
  5. GOVERSION=$(shell go version)
  6. DATE=$(shell date)
  7. LDFLAGS=-s -w
  8. LDGENERICFLAGS=-X 'mvoCI/core.BuildTime=$(DATE)' -X 'mvoCI/core.Compiler=$(GOVERSION)' -X 'mvoCI/core.GitHash=$(HASH)'
  9. DEBUGLDVERSION=-X 'mvoCI/core.Version=dev-$(DEBUGVERSION)'
  10. RELEASELDVERSION=-X 'mvoCI/core.Version=$(RELEASEVERSION)'
  11. DEBUGLDFLAGS=$(LDFLAGS) $(DEBUGLDVERSION) $(LDGENERICFLAGS)
  12. RELEASELDFLAGS=$(LDFLAGS) $(RELEASELDVERSION) $(LDGENERICFLAGS)
  13. all:
  14. go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go
  15. debug:
  16. go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go --debug
  17. install:
  18. go run -gccgoflags "-pthread" -ldflags "$(DEBUGLDFLAGS)" main.go --install
  19. mvobuild:
  20. go build -gccgoflags "-pthread" -ldflags "$(DEBUGFLAGS)" main.go
  21. mv main mvo
  22. #-upx mvo
  23. release:
  24. go build -gccgoflags "-pthread" -ldflags "$(RELEASELDFLAGS)" main.go
  25. mv main mvo
  26. dist: mvobuild
  27. rm -rf $(DISTDIR)
  28. mkdir $(DISTDIR)
  29. mv mvo $(DISTDIR)
  30. cp -r views $(DISTDIR)
  31. cp -r static $(DISTDIR)
  32. clean:
  33. -rm mvo
  34. -rm -rf dist
  35. dep:
  36. go get github.com/jinzhu/gorm github.com/labstack/echo golang.org/x/crypto/bcrypt github.com/foolin/goview github.com/foolin/goview/supports/echoview-v4 github.com/dgrijalva/jwt-go github.com/denisenkom/go-mssqldb github.com/go-sql-driver/mysql github.com/lib/pq github.com/lib/pq/hstore github.com/mattn/go-sqlite3
  37. doc:
  38. godoc -http=localhost:6060
  39. vet:
  40. go vet
  41. ctags:
  42. ctags -R --language-force=go .