- only `mkdir`the dist dirs when they are absent
- add the dist dirs as prereqs so targets like `make release-sources`
can run standalone
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
cd$(DIST);for file in `find /build -type f -name "*"`;do cp $${file} ./release/;done;
.PHONY:release-check
release-check:
release-check:|$(DIST_DIRS)
cd$(DIST)/release/;for file in `find . -type f -name "*"`;doecho"checksumming $${file}"&&$(SHASUM)`echo$${file}| sed 's/^..//'` > $${file}.sha256;done;
.PHONY:release-compress
release-compress:
release-compress:|$(DIST_DIRS)
@hash gxz > /dev/null 2>&1;if[$$? -ne 0];then\
$(GO) get -u github.com/ulikunitz/xz/cmd/gxz;\
fi
cd$(DIST)/release/;for file in `find . -type f -name "*"`;doecho"compressing $${file}"&& gxz -k -9 $${file};done;
.PHONY:release-sources
release-sources:
release-sources:|$(DIST_DIRS)
tar cvzf $(DIST)/release/gitea-src-$(VERSION).tar.gz --exclude $(DIST) --exclude .git --exclude $(MAKE_EVIDENCE_DIR) .