Add a script to tag a release 63/76063/2
authorStephen Kitt <skitt@redhat.com>
Thu, 13 Sep 2018 13:53:13 +0000 (15:53 +0200)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 17 Sep 2018 00:47:19 +0000 (20:47 -0400)
Change-Id: Ia59a51a2742feb613cd87aac1691861da4f7d6ec
Signed-off-by: Stephen Kitt <skitt@redhat.com>
docs/release-process/project-release.rst

index 87e7a607fafd64abac463e577dffb2bc2e5d8bb1..8d755ad43844201fee58835ad9dec95029683985 100644 (file)
@@ -54,3 +54,42 @@ Steps 4-7 as bash:
 
 Once complete the Git tag should be available in Gerrit and the Artifacts should
 appear in the Nexus opendaylight.release repo.
+
+The following shell script will do this for you:
+
+.. code:: bash
+
+    #!/bin/sh
+
+    set -e
+
+    if [ $# != 3 ]; then
+        echo Usage: $0 project version log-URL
+        echo fetches a project release\'s logs from log-URL and tags the git repository
+        exit 1
+    fi
+
+    PROJECT=$1
+    VERSION=$2
+    PATCH_DIR=/tmp/patches
+
+    mkdir -p $PATCH_DIR
+    cd $PATCH_DIR
+    rm -f ${PROJECT}.bundle taglist.log{,.gz}
+    wget ${3}/patches/{${PROJECT}.bundle,taglist.log.gz}
+    gunzip taglist.log.gz
+    cd -
+    git checkout $(awk '{print $NF}' "$PATCH_DIR/taglist.log")
+    git fetch "$PATCH_DIR/$PROJECT.bundle"
+    git merge --ff-only FETCH_HEAD
+    git tag -asm "$PROJECT $VERSION" "v$VERSION"
+    git push origin "v$VERSION"
+
+You need to run it from a clone git repository of your project,
+and give it as arguments the project’s short name, the newly-
+released version, and the URL of the release build’s logs; for
+example:
+
+.. code:: bash
+
+    sign-odl-release odlparent 4.0.0 https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/odlparent-maven-release-master/11/