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.

Makefile 927B

123456789101112131415161718192021222324252627282930
  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. pack:
  12. find . -name ".DS_Store" -print0 | xargs -0 rm
  13. rm -rf $(RELEASE_GOGS)
  14. mkdir -p $(RELEASE_GOGS)
  15. cp -r gogs LICENSE README.md README_ZH.md templates public scripts $(RELEASE_GOGS)
  16. rm -rf $(RELEASE_GOGS)/public/config.codekit $(RELEASE_GOGS)/public/less
  17. cd $(RELEASE_ROOT) && zip -r gogs.$(NOW).zip "gogs"
  18. release: build pack
  19. bindata:
  20. go-bindata -o=modules/bindata/bindata.go -ignore="\\.DS_Store|README.md" -pkg=bindata conf/...
  21. clean:
  22. go clean -i ./...