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.

1234567891011121314151617181920212223242526272829303132333435
  1. LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
  2. LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildGitHash=$(shell git rev-parse HEAD)"
  3. TAGS = ""
  4. RELEASE_ROOT = "release"
  5. RELEASE_GOGS = "release/gogs"
  6. NOW = $(shell date -u '+%Y%m%d%I%M%S')
  7. .PHONY: build pack release bindata clean
  8. build:
  9. go install -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
  10. go build -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
  11. govet:
  12. go tool vet -composites=false -methods=false -structtags=false .
  13. pack:
  14. rm -rf $(RELEASE_GOGS)
  15. mkdir -p $(RELEASE_GOGS)
  16. cp -r gogs LICENSE README.md README_ZH.md templates public scripts $(RELEASE_GOGS)
  17. rm -rf $(RELEASE_GOGS)/public/config.codekit $(RELEASE_GOGS)/public/less
  18. cd $(RELEASE_ROOT) && zip -r gogs.$(NOW).zip "gogs"
  19. release: build pack
  20. bindata:
  21. go-bindata -o=modules/bindata/bindata.go -ignore="\\.DS_Store|README.md" -pkg=bindata conf/...
  22. clean:
  23. go clean -i ./...
  24. clean-mac: clean
  25. find . -name ".DS_Store" -print0 | xargs -0 rm