mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
build: Create release target
To build a new release, including tagging and commiting the release changes (regenerate svtplay-dl, and update Makefile with LATEST_RELEASE), just do make release. Obviously, the intended user of this target is the upstream author(s). As part of the make release target, svtplay-dl will be unit tested and the manpage will be checked to make sure all options are documented. All of this happens in a local clone of your local repo. This is to make sure that no files are left uncommited. Finally, the changes necessary will be applied to your repo and a tag will be set. All you have to do at this point is to verify that everything looks ok, and then push master and the new tag to github.
This commit is contained in:
parent
47b05a245d
commit
87304cbbc7
32
Makefile
32
Makefile
@ -1,8 +1,12 @@
|
||||
all: svtplay-dl
|
||||
|
||||
.PHONY: test cover doctest pylint svtplay-dl
|
||||
.PHONY: test cover doctest pylint svtplay-dl \
|
||||
release clean_releasedir $(RELEASE_DIR)
|
||||
|
||||
VERSION = 0.10.$(shell date +%Y.%m.%d)
|
||||
VERSION = 0.10
|
||||
RELEASE = $(VERSION).$(shell date +%Y.%m.%d)
|
||||
RELEASE_DIR = svtplay-dl-$(RELEASE)
|
||||
LATEST_RELEASE = 0.10.2015.01.28
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
@ -56,6 +60,30 @@ pylint:
|
||||
doctest: svtplay-dl
|
||||
sh scripts/diff_man_help.sh
|
||||
|
||||
$(RELEASE_DIR): clean_releasedir
|
||||
mkdir svtplay-dl-$(RELEASE)
|
||||
cd svtplay-dl-$(RELEASE) && git clone -b master ../ . && make svtplay-dl
|
||||
|
||||
clean_releasedir:
|
||||
rm -rf $(RELEASE_DIR)
|
||||
|
||||
release: $(RELEASE_DIR) release-test
|
||||
cd $(RELEASE_DIR) && \
|
||||
sed -i -r -e 's/^(LATEST_RELEASE = ).*/\1$(RELEASE)/' Makefile;\
|
||||
git add svtplay-dl Makefile; \
|
||||
git commit -m "Prepare for release $(RELEASE)";
|
||||
(cd $(RELEASE_DIR) && git format-patch --stdout HEAD^) | git am
|
||||
|
||||
git tag -m "New version $(RELEASE)" \
|
||||
-m "$$(git log --oneline $(LATEST_RELEASE)..HEAD^)" \
|
||||
$(RELEASE)
|
||||
|
||||
make clean_releasedir
|
||||
|
||||
release-test: $(RELEASE_DIR)
|
||||
make -C $(RELEASE_DIR) test
|
||||
make -C $(RELEASE_DIR) doctest
|
||||
|
||||
clean:
|
||||
$(MAKE) -C lib clean
|
||||
rm -f svtplay-dl
|
||||
|
Loading…
Reference in New Issue
Block a user