[rtems-testing commit] release.sh: Add helper advice on clean up after an error

Joel Sherril joel at rtems.org
Thu May 14 20:30:07 UTC 2015


Module:    rtems-testing
Branch:    master
Commit:    c4ebcc12eefb4856d460e441086f1a767cdc0594
Changeset: http://git.rtems.org/rtems-testing/commit/?id=c4ebcc12eefb4856d460e441086f1a767cdc0594

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Thu May 14 15:30:03 2015 -0500

release.sh: Add helper advice on clean up after an error

---

 release-helpers/release.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/release-helpers/release.sh b/release-helpers/release.sh
index 12f347c..8181bf7 100755
--- a/release-helpers/release.sh
+++ b/release-helpers/release.sh
@@ -58,7 +58,30 @@ Major:   Example 4.11, 4.12
 Version: 4.11.0, 4.11.1, 4.11.99.0
 
 An action of making a dot release or bumping the major must be specified.
+
 EOF
+
+if [ ${repo} != "NOT_SET" ] ; then
+  echo "An error has occurred and clean up may be needed. The following should"
+  echo "help identify what may need to be done for cleanup."
+
+  if [ ${bump_dot_release} = "yes" ] ; then
+    echo "  git checkout master"
+    echo "  git branch -D ${MAJOR}"
+    echo "  git tag -d ${VERSION}"
+    echo "  rm -rf rtems-${VERSION}.tar.bz2 rtems-${VERSION}"
+    case ${repo} in
+      rtems)
+        echo "  rm -rf b-doc b-doxy"
+        echo "  rtems-doxygen-${VERSION}.tar.bz2 rtems-doxygen-${VERSION}"
+        echo "  rtemsdocs-${VERSION}.tar.bz2 rtemsdocs-${VERSION}"
+        ;;
+    esac
+  else
+    echo "  git checkout master"
+    echo "  git branch -D @WORKING@"
+  fi 
+fi
 }
 
 toggle()
@@ -85,6 +108,7 @@ check_dep()
 
 #  Set up variables which control the scripts behavior
 verbose=yes
+repo=NOT_SET
 VERSION=NOT_SET
 MAJOR=NOT_SET
 bump_dot_release=no



More information about the vc mailing list