diff options
author | Unknwon <u@gogs.io> | 2015-11-03 12:16:43 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-03 12:16:43 -0500 |
commit | a374751eb84c038f22b300bb0c6e5c4586cd0909 (patch) | |
tree | a429896e7f9a949ff10d2842a06f92f68e0a6d8a /Makefile | |
parent | 0af035c37e8b561662c93b163b3294b91be6ffac (diff) | |
download | gitea-a374751eb84c038f22b300bb0c6e5c4586cd0909.tar.gz gitea-a374751eb84c038f22b300bb0c6e5c4586cd0909.zip |
add Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..971727d704 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')" +LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildGitHash=$(shell git rev-parse HEAD)" + +TAGS = "" + +RELEASE_ROOT = "release" +RELEASE_GOGS = "release/gogs" +NOW = $(shell date -u '+%Y%m%d%I%M%S') + +.PHONY: build pack release bindata clean + +build: + go install -ldflags '$(LDFLAGS)' -tags '$(TAGS)' + go build -ldflags '$(LDFLAGS)' -tags '$(TAGS)' + +pack: + find . -name ".DS_Store" -print0 | xargs -0 rm + rm -rf $(RELEASE_GOGS) + mkdir -p $(RELEASE_GOGS) + cp -r gogs LICENSE README.md README_ZH.md templates public scripts $(RELEASE_GOGS) + rm -rf $(RELEASE_GOGS)/public/config.codekit $(RELEASE_GOGS)/public/less + cd $(RELEASE_ROOT) && zip -r gogs.$(NOW).zip "gogs" + +release: build pack + +bindata: + go-bindata -o=modules/bindata/bindata.go -ignore="\\.DS_Store|README.md" -pkg=bindata conf/... + +clean: + go clean -i ./...
\ No newline at end of file |