forked from jjzhang/booth
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile used to tag and create official tarballs. Signed-off-by: Jan Friesse <[email protected]>
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# to build official release tarballs, handle tagging and publish. | ||
|
||
# example: | ||
# make -f build-aux/release.mk all version=1.1 release=yes | ||
|
||
project=booth | ||
|
||
all: checks setup tag tarballs sha256 | ||
|
||
checks: | ||
ifeq (,$(version)) | ||
@echo ERROR: need to define version= | ||
@exit 1 | ||
endif | ||
@if [ ! -d .git ]; then \ | ||
echo This script needs to be executed from top level cluster git tree; \ | ||
exit 1; \ | ||
fi | ||
|
||
@if ! grep "fallback $(version)" configure.ac > /dev/null; then \ | ||
echo "Don't forget update fallback version in configure.ac before release"; \ | ||
exit 1; \ | ||
fi | ||
|
||
setup: checks | ||
./autogen.sh | ||
./configure --without-glue | ||
make maintainer-clean | ||
|
||
tag: setup ./tag-$(version) | ||
|
||
tag-$(version): | ||
ifeq (,$(release)) | ||
@echo Building test release $(version), no tagging | ||
else | ||
git tag -a -m "v$(version) release" v$(version) HEAD | ||
@touch $@ | ||
endif | ||
|
||
tarballs: tag | ||
./autogen.sh | ||
./configure --without-glue | ||
BOOTH_RUNTESTS_ROOT_USER=1 make distcheck DISTCHECK_CONFIGURE_FLAGS="--without-glue" | ||
|
||
sha256: tarballs $(project)-$(version).sha256 | ||
|
||
$(project)-$(version).sha256: | ||
ifeq (,$(release)) | ||
@echo Building test release $(version), no sha256 | ||
else | ||
sha256sum $(project)-$(version)*tar* | sort -k2 > $@ | ||
endif | ||
|
||
clean: | ||
rm -rf $(project)-* tag-* |