make: add release-sources (#10295)

* make: add release-sources

* make: release-sources exclude .git and make_evidence
This commit is contained in:
Antoine GIRARD 2020-02-16 18:53:02 +01:00 committed by GitHub
parent df758f3cc9
commit 9bada628f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -446,7 +446,7 @@ $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
.PHONY: release .PHONY: release
release: generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-check release: generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-sources release-check
.PHONY: release-dirs .PHONY: release-dirs
release-dirs: release-dirs:
@ -497,6 +497,10 @@ release-compress:
fi fi
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done; cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
.PHONY: release-sources
release-sources:
tar cvzf $(DIST)/release/gitea-src-$(VERSION).tar.gz --exclude $(DIST) --exclude .git --exclude $(MAKE_EVIDENCE_DIR) .
node_modules: package-lock.json node_modules: package-lock.json
npm install --no-save npm install --no-save
@touch node_modules @touch node_modules