]> git.sur5r.net Git - openocd/commitdiff
Add script to test the release process.
authorZachary T Welch <zw@superlucidity.net>
Thu, 22 Oct 2009 10:04:08 +0000 (03:04 -0700)
committerZachary T Welch <zw@superlucidity.net>
Wed, 28 Oct 2009 06:53:15 +0000 (23:53 -0700)
Runs the release.sh script in a freshly cloned repository, charting
one hypothetical future of OpenOCD's lineage.

tools/release/test.sh [new file with mode: 0755]

diff --git a/tools/release/test.sh b/tools/release/test.sh
new file mode 100755 (executable)
index 0000000..1f321e0
--- /dev/null
@@ -0,0 +1,121 @@
+#!/bin/sh -e
+
+SRC="$1"
+if [ "${SRC}" ]; then
+       shift
+else
+       SRC="${0%%/*}"
+fi
+if [ ! -d "${SRC}/.git" ]; then
+       echo "'${SRC}' is not a git repository"
+       exit 1
+fi
+
+DST="$1"
+[ "${DST}" ] || DST="release-${SRC}"
+
+export RELEASE_FAST=yes
+
+cat <<EOF
+Starting test release clone process:
+   from: '${SRC}'
+     to: '${DST}'
+This will destroy any contents in '${DST}'.
+EOF
+echo -n "Press Control-C to abort in "
+for i in $(seq 5 -1 1); do echo -n "$i "; sleep 1; done
+echo "go!"
+
+rm -rf "${DST}"
+git clone "${SRC}" "${DST}"
+
+cd "${DST}"
+#     TAG+RELEASE     NEW BRANCH (w/ -dev)
+#      0.3.0           0.4.0-rc0
+tools/release.sh release --next='minor' --start-rc
+
+git checkout -q "v0.3.0"
+#      <none>          0.3.1
+tools/release.sh branch --next='micro'
+#      0.3.1           0.3.2
+tools/release.sh release --next='micro'
+
+git checkout "v0.4.0-rc0-dev"
+#      0.4.0-rc0       0.4.0-rc1
+tools/release.sh release --next='rc'
+#      0.4.0           1.0.0-rc0
+tools/release.sh release --next='major' --final --start-rc
+
+git checkout -q "v0.4.0"
+#      <none>          0.4.1
+tools/release.sh branch --next='micro'
+#      0.4.1           0.4.2
+tools/release.sh release --next='micro'
+
+git checkout "v1.0.0-rc0-dev"
+#      1.0.0-rc0       1.0.0-rc1
+tools/release.sh release --next='rc'
+#      1.0.0           1.1.0-rc0
+tools/release.sh release --next='minor' --final --start-rc
+
+git checkout -q "v1.0.0"
+#      <none>          1.0.1
+tools/release.sh branch --next='micro'
+#      1.0.1           1.0.2
+tools/release.sh release --next='micro'
+
+git checkout "v1.1.0-rc0-dev"
+#      1.1.0-rc0       1.1.0-rc1
+tools/release.sh release --next='rc'
+#      1.1.0           1.2.0
+tools/release.sh release --next='minor' --final --start-rc
+
+git checkout -q "v1.0.0"
+tools/release.sh branch --next='major' --start-rc
+
+#      <none>          2.0.0-rc0
+git checkout "v2.0.0-rc0-dev"
+#      2.0.0-rc0       2.0.0-rc1
+tools/release.sh release --next='rc'
+#      2.0.0-rc1       2.0.0-rc2
+tools/release.sh release --next='rc'
+#      2.0.0           2.1.0-rc0
+tools/release.sh release --next='minor' --final --start-rc
+
+git checkout -q "v1.1.0"
+#      <none>          1.1.1
+tools/release.sh branch --next='micro'
+#      1.1.1           1.1.2
+tools/release.sh release --next='micro'
+
+git checkout -q "v2.0.0"
+#      <none>          2.0.0
+tools/release.sh branch --next='micro'
+#      2.0.1           2.0.2
+tools/release.sh release --next='micro'
+
+git checkout "v1.2.0-rc0-dev"
+#      1.2.0-rc0       1.2.0-rc1
+tools/release.sh release --next='rc'
+#      1.2.0           1.3.0-rc0
+tools/release.sh release --next='micro' --final
+
+git checkout "v2.1.0-rc0-dev"
+#      2.1.0-rc0       2.1.0-rc1
+tools/release.sh release --next='rc'
+#      2.1.0-rc1       2.1.0-rc2
+tools/release.sh release --next='rc'
+#      2.1.0           2.2.0-rc0
+tools/release.sh release --next='minor' --final --start-rc
+
+git checkout -q "v2.1.0"
+#      <none>          2.1.1
+tools/release.sh branch --next='micro'
+#      2.1.1           2.1.2
+tools/release.sh release --next='micro'
+
+git checkout "v2.2.0-rc0-dev"
+#      2.2.0-rc0       2.2.0-rc1
+tools/release.sh release --next='rc'
+
+gitk --all