diff options
author | Martin Frost <frost@ceri.se> | 2015-01-01 23:29:27 +0100 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2015-01-07 16:15:12 +0100 |
commit | 366dd721483e6dd55e1da1ca7aa6caa3efc19261 (patch) | |
tree | 5bee8bf15f229badb427df6762d5b251c8bd3cba /maint | |
parent | f80e2eec18afb4cdf8fd925fc531b7f778ba8c37 (diff) |
Improve release script with a focus on Debian
- Fix obvious typos in `release.in`.
- Build both binary and source Debian package. Also, make sure to run
`debuild` in the actual build directory.
- Add Debian source packages to gh-pages branch.
- Put lonely `:` on its own line, to help it stand out.
- Turn on signing for Debian source packages.
Diffstat (limited to 'maint')
-rwxr-xr-x | maint/release.in | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/maint/release.in b/maint/release.in index 40af317..58ba8c8 100755 --- a/maint/release.in +++ b/maint/release.in @@ -1,7 +1,7 @@ #!/bin/sh -ORIGIN_URL=$(shell git config --get remote.origin.url) -CURRENT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) +ORIGIN_URL=$(git config --get remote.origin.url) +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) PACKAGE='@PACKAGE@' PACKAGE_VERSION='@PACKAGE_VERSION@' abs_srcdir='@abs_srcdir@' @@ -79,20 +79,24 @@ release_clean_arch() { # Deb release_build_deb() { ([ -d deb-build ] || mkdir -p deb-build) && \ - cp $(DIST_ARCHIVES) deb-build/$(PACKAGE)_$(PACKAGE_VERSION).orig.tar.gz && \ - tar -C deb-build -xf deb-build/$(PACKAGE)_$(PACKAGE_VERSION).orig.tar.gz && \ - cp -R debian deb-build/$(PACKAGE)-$(PACKAGE_VERSION) && \ - cd deb-build/$(PACKAGE)-$(PACKAGE_VERSION) && \ + cp ${DIST_ARCHIVES} deb-build/${PACKAGE}_${PACKAGE_VERSION}.orig.tar.gz && \ + tar -C deb-build -xf deb-build/${PACKAGE}_${PACKAGE_VERSION}.orig.tar.gz && \ + cp -R debian deb-build/${PACKAGE}-${PACKAGE_VERSION} && \ + cd deb-build/${PACKAGE}-${PACKAGE_VERSION} && \ dch -d "New upstream release" && dch -r "" && \ - cp debian/changelog $(abs_srcdir)/debian/changelog && \ - debuild -us -uc && \ - cd $(abs_srcdir) && \ - ([ -d gh-pages ] || git clone --branch gh-pages $(ORIGIN_URL) gh-pages) && \ + debuild -F && \ + cd ${abs_top_builddir} && \ + ([ -d gh-pages ] || git clone --branch gh-pages ${ORIGIN_URL} gh-pages) && \ ([ -d gh-pages/debs ] || mkdir gh-pages/debs) && \ - cp deb-build/$(PACKAGE)_$(PACKAGE_VERSION)*.deb gh-pages/debs && \ + ([ -d gh-pages/deb-src ] || mkdir gh-pages/deb-src) && \ + cp deb-build/${PACKAGE}_${PACKAGE_VERSION}*.deb gh-pages/debs && \ + cp deb-build/${PACKAGE}_${PACKAGE_VERSION}*.dsc gh-pages/deb-src && \ + cp deb-build/${PACKAGE}_${PACKAGE_VERSION}*.{orig,debian}.tar.gz gh-pages/deb-src && \ cd gh-pages && \ - git add debs/$(PACKAGE)_$(PACKAGE_VERSION)*deb && \ - git commit -m "Release version $(PACKAGE_VERSION) for Debian" -- debs/$(PACKAGE)_$(PACKAGE_VERSION)*deb + git add debs/${PACKAGE}_${PACKAGE_VERSION}*deb && \ + git add deb-src/${PACKAGE}_${PACKAGE_VERSION}*dsc && \ + git add deb-src/${PACKAGE}_${PACKAGE_VERSION}*{orig,debian}.tar.gz && \ + git commit -m "Release version ${PACKAGE_VERSION} for Debian" -- debs/${PACKAGE}_${PACKAGE_VERSION}*deb } release_push_deb() { @@ -116,6 +120,7 @@ release_push_tag() { } release_clean_tag() { + : } generate_dist_sha() { @@ -145,7 +150,7 @@ release_clean_man_html() { # Main: -if [ $# < 3 ]; then +if [ $# -lt 3 ]; then echo "Usage: release (build|push|clean) (tarball|homebrew|arch|deb|tag|man_html) DIST_ARCHIVES" >&2 exit 64 fi |