summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2018-05-21 20:50:39 +0200
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-05-21 14:50:39 -0400
commit08c9617caa0a8afb2d1fad92907fed89fdf4b231 (patch)
treec62907e4912c36222fee3216a6929e6954484dd2 /Makefile
parent75982127c803ab71ff2d8ac4d2ea0904fd62f771 (diff)
downloadgitea-08c9617caa0a8afb2d1fad92907fed89fdf4b231.tar.gz
gitea-08c9617caa0a8afb2d1fad92907fed89fdf4b231.zip
Provide compressed releases (#3991)
* Add release-compress to provide compressed releases * check after compress
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 85be7eee81..2dea0a9ea6 100644
--- a/Makefile
+++ b/Makefile
@@ -234,7 +234,7 @@ $(EXECUTABLE): $(SOURCES)
$(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
.PHONY: release
-release: release-dirs release-windows release-linux release-darwin release-copy release-check
+release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check
.PHONY: release-dirs
release-dirs:
@@ -278,6 +278,13 @@ release-copy:
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
+.PHONY: release-compress
+release-compress:
+ @hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
+ $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \
+ fi
+ cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),gxz -k -9 $(notdir $(file));)
+
.PHONY: javascripts
javascripts: public/js/index.js