From 9b276987aed39528996415e98519dcb7aa463cb3 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Mon, 26 Dec 2016 17:17:53 +1300 Subject: [PATCH] Update for building releases locally (cherry picked from commit e9a289e986b53580ce9397ea8c0edc14ffbcc8ec) (cherry picked from commit 7463c2df3f320601b67ca802a4e10fe874f772b6) --- xapian-maintainer-tools/git-tag-release | 82 ++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/xapian-maintainer-tools/git-tag-release b/xapian-maintainer-tools/git-tag-release index 67b8033d1..303905b45 100755 --- a/xapian-maintainer-tools/git-tag-release +++ b/xapian-maintainer-tools/git-tag-release @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004,2005,2007,2008,2010,2012,2013,2014,2015 Olly Betts +# Copyright (C) 2004,2005,2007,2008,2010,2012,2013,2014,2015,2016 Olly Betts # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -24,6 +24,9 @@ set -e BRANCH=svn/1.2 +RELEASE_WEB_BASE_URL=https://oligarchy.co.uk/xapian +RELEASE_WEB_BASE_DIR=/srv/www/oligarchy.co.uk/xapian + version=$1 # check parameter was passed and that it looks like a version @@ -38,12 +41,8 @@ case $version in esac # Check that we've not already done this version. -download_dir=/srv/www/oligarchy.co.uk/xapian/$version -if [ -d "$download_dir" ] ; then - echo "Version $version already has a download directory:" - echo " $download_dir" - exit 1 -fi +RELEASE_URL=$RELEASE_WEB_BASE_URL/$version/ +RELEASE_DIR=$RELEASE_WEB_BASE_DIR/$version/ if [ "`git branch --color=never --contains|cut -d' ' -f2-`" != "$BRANCH" ] ; then echo "Not on branch $BRANCH" @@ -62,37 +61,58 @@ for d in xapian-core xapian-bindings xapian-applications/omega ; do done [ "$bad" = "0" ] || exit 1 -tag=v$version -while ! git tag -v "$tag" > /dev/null 2>&1 ; do - cat </dev/null||true` +case $head_output in +"404 "*) ;; +*) + cat < /dev/null 2>&1 ; then + echo "Tag '$tag' exists" +else + echo "Tagging '$tag'" + git tag -s -m "Xapian $version release" "$tag" "$BRANCH" +fi -# Clean up. -rm -rf "$D/$tag" -rmdir $D || echo "Directory '$D' not removed." +echo "Copying to server" +scp -r "$RESULT" thyestes.tartarus.org:"$RELEASE_DIR" +echo "Adding to trac" # Add the version to the list in trac, close old milestone, ensure new # milestone exists, and create the ReleaseNotes and ReleaseOverview # pages: -xapian-trac-new-release "$version" +ssh thyestes.tartarus.org bin/xapian-trac-new-release "$version" -- 2.11.4.GIT