From 3e573fa21e36f6e25884b3c94d13342340f0f08c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 26 Oct 2012 18:20:09 +0200 Subject: [PATCH] begin to merge releasehelper into build Signed-off-by: Nico Schottelius --- build | 83 +++++++++++++++++++++++++++++++++++++++++- docs/dev/releasehelper | 64 -------------------------------- 2 files changed, 81 insertions(+), 66 deletions(-) delete mode 100755 docs/dev/releasehelper diff --git a/build b/build index bb31ccc0..7fb3c2ec 100755 --- a/build +++ b/build @@ -88,13 +88,26 @@ case "$1" in ${MANDIR}/cdist-reference.text.sh ;; - release) + dist) + $0 dist-pypi + + # Archlinux depends on successful pypi ;-) + $0 dist-archlinux + + $0 dist-post + ;; + + dist-prepare) ./docs/dev/releasehelper ;; + dist-post) + + ;; + dist-archlinux) ./PKGBUILD.in - makepkg + makepkg -c ;; dist-pypi) @@ -202,3 +215,69 @@ case "$1" in ;; esac + + +#!/bin/sh +# Nico Schottelius + +# Ensure documentation builds cleanly +echo "Verifying documentation building works ..." +## ./build clean && ./build man || exit 1 + +# get version from changelog and ensure it's not already present +changelog_version=$(grep '^[[:digit:]]' docs/changelog | head -n1 | sed 's/:.*//') + +if git show --quiet $changelog_version >/dev/null 2>&1; then + echo "Version $changelog_version already exists, aborting." + exit 1 +fi + +echo "Target version from changelog: $changelog_version" + +# verify date in changelog +date_today="$(date +%Y-%m-%d)" +date_changelog=$(grep '^[[:digit:]]' docs/changelog | head -n1 | sed 's/.*: //') + +if [ "$date_today" != "$date_changelog" ]; then + echo "Date in changelog is not today" + echo "Changelog: $date_changelog" + exit 1 +fi + +echo "Press enter to continue" +read wait +version=$changelog_version + +# get target branch +target_branch=${version%\.*} +current_branch=$(git rev-parse --abbrev-ref HEAD) + +echo "Selected branch $target_branch for merging $current_branch" + +# add tag +printf "Enter tag description for %s> " "$version" +read tagmessage +git tag "$version" -m "$tagmessage" + +# Import into current version branch +printf "Press enter to git merge into branch \"$target_branch\" > " +read prompt +git checkout "$target_branch" +git merge "$current_branch" +git checkout "$current_branch" + +# Publish manpages and sourcecode +printf "Press enter to publish doc/ code/ pypi for $version > " +read prompt +./build web +./build pub + +cat << notes +To be done manually... + + - freecode release + - blog entry + - linkedin entry + - mailinglist update + +notes diff --git a/docs/dev/releasehelper b/docs/dev/releasehelper deleted file mode 100755 index 4a570f89..00000000 --- a/docs/dev/releasehelper +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# Nico Schottelius - -# Ensure documentation builds cleanly -echo "Verifying documentation building works ..." -## ./build clean && ./build man || exit 1 - -# get version from changelog and ensure it's not already present -changelog_version=$(grep '^[[:digit:]]' docs/changelog | head -n1 | sed 's/:.*//') - -if git show --quiet $changelog_version >/dev/null 2>&1; then - echo "Version $changelog_version already exists, aborting." - exit 1 -fi - -echo "Target version from changelog: $changelog_version" - -# verify date in changelog -date_today="$(date +%Y-%m-%d)" -date_changelog=$(grep '^[[:digit:]]' docs/changelog | head -n1 | sed 's/.*: //') - -if [ "$date_today" != "$date_changelog" ]; then - echo "Date in changelog is not today" - echo "Changelog: $date_changelog" - exit 1 -fi - -echo "Press enter to continue" -read wait -version=$changelog_version - -# get target branch -target_branch=${version%\.*} -current_branch=$(git rev-parse --abbrev-ref HEAD) - -echo "Selected branch $target_branch for merging $current_branch" - -# add tag -printf "Enter tag description for %s> " "$version" -read tagmessage -git tag "$version" -m "$tagmessage" - -# Import into current version branch -printf "Press enter to git merge into branch \"$target_branch\" > " -read prompt -git checkout "$target_branch" -git merge "$current_branch" -git checkout "$current_branch" - -# Publish manpages and sourcecode -printf "Press enter to publish doc/ code/ pypi for $version > " -read prompt -./build web -./build pub - -cat << notes -To be done manually... - - - freecode release - - blog entry - - linkedin entry - - mailinglist update - -notes