From 9a3ef2b0e50184e93ed0b97ffee91f8c3cbf552b Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 6 Nov 2015 14:28:41 +0100 Subject: Fix the release script First time running it ... not bad! --- maint/release.in | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'maint') diff --git a/maint/release.in b/maint/release.in index d159bae..1df9f97 100755 --- a/maint/release.in +++ b/maint/release.in @@ -14,7 +14,8 @@ edit_package() { -e "s|@PACKAGE[@]|$PACKAGE|g" \ -e "s|@PACKAGE_VERSION[@]|$PACKAGE_VERSION|g" \ -e "s|@DIST_ARCHIVES[@]|$DIST_ARCHIVES|g" \ - -e "s|@DIST_SHA[@]|$DIST_SHA|g" + -e "s|@DIST_SHA[@]|$DIST_SHA|g" \ + "$1" } # Tarball @@ -40,7 +41,8 @@ release_clean_tarball() { # Homebrew release_build_homebrew() { ([ -d homebrew-formulae ] || git clone git@github.com:thoughtbot/homebrew-formulae.git homebrew-formulae) && \ - $edit_package homebrew/$PACKAGE.rb.in > homebrew-formulae/Formula/$PACKAGE.rb && \ + generate_dist_sha && \ + edit_package homebrew/$PACKAGE.rb.in > homebrew-formulae/Formula/$PACKAGE.rb && \ cd homebrew-formulae && \ git add Formula/$PACKAGE.rb && \ git commit -m "$PACKAGE: Release version $PACKAGE_VERSION" @@ -60,7 +62,8 @@ release_clean_homebrew() { release_build_arch() { ([ -d gh-pages ] || git clone --branch gh-pages . gh-pages) && \ ([ -d gh-pages/arch ] || mkdir gh-pages/arch) && \ - $edit_package arch/PKGBUILD.in > gh-pages/arch/PKGBUILD &&\ + generate_dist_sha && \ + edit_package arch/PKGBUILD.in > gh-pages/arch/PKGBUILD &&\ cd gh-pages &&\ git add arch/PKGBUILD &&\ git commit -m "Release version $PACKAGE_VERSION Arch package" @@ -84,18 +87,20 @@ release_build_deb() { cp -R debian deb-build/${PACKAGE}-${PACKAGE_VERSION} && \ cd deb-build/${PACKAGE}-${PACKAGE_VERSION} && \ dch -d "New upstream release" && dch -r "" && \ - debuild -F && \ + debuild --prepend-path=/usr/local/bin -e USER -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) && \ ([ -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 && \ + cp deb-build/${PACKAGE}_${PACKAGE_VERSION}*.orig.tar.?z gh-pages/deb-src && \ + cp deb-build/${PACKAGE}_${PACKAGE_VERSION}*.debian.tar.?z gh-pages/deb-src && \ cd gh-pages && \ 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 add deb-src/${PACKAGE}_${PACKAGE_VERSION}*orig.tar.?z && \ + git add deb-src/${PACKAGE}_${PACKAGE_VERSION}*debian.tar.?z && \ git commit -m "Release version ${PACKAGE_VERSION} for Debian" -- debs/${PACKAGE}_${PACKAGE_VERSION}*deb } @@ -129,9 +134,9 @@ generate_dist_sha() { # manpages as HTML release_build_man_html() { - ([ -d $abs_top_builddir/gh-pages ] || git clone --branch gh-pages --single-branch .. $abs_top_builddir/gh-pages) && \ + ([ -d gh-pages ] || git clone --branch gh-pages . gh-pages) && \ for i in $dist_man_MANS; do \ - mandoc -Thtml -Oman=%N.%S.html $$i > $abs_top_builddir/gh-pages/$$i.html ; \ + mandoc -Thtml -Oman=%N.%S.html man/$i > $abs_top_builddir/gh-pages/$i.html ; \ done && \ cd $abs_top_builddir/gh-pages && \ cp rcm.7.html index.html && \ -- cgit v1.2.3