releng: Add script to change product update site to stable
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 22 Aug 2016 06:06:04 +0000 (02:06 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 23 Aug 2016 04:27:36 +0000 (00:27 -0400)
Also add a parent script that executes both this script
and the script that sets the automatic update.

Change-Id: Ifd5d384900ec0fb58145c7bc735ed5e180c54a65
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/79411
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
releng/master_to_stable_release.sh [new file with mode: 0755]
releng/set_stable_update_site.sh [new file with mode: 0755]

diff --git a/releng/master_to_stable_release.sh b/releng/master_to_stable_release.sh
new file mode 100755 (executable)
index 0000000..0f621b3
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+
+# A simple script that automates the step when branching from master to a
+# stable branch.
+
+source set_stable_update_site.sh
+source set_automatic_updates.sh
+
diff --git a/releng/set_stable_update_site.sh b/releng/set_stable_update_site.sh
new file mode 100755 (executable)
index 0000000..3a00ccf
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+
+# A simple script that sets the rcp to use the stable update site. This is
+# meant to be used when the master branch is being branched into a stable
+# branch.
+
+PATH_TO_PRODUCT_FILE="../rcp/org.eclipse.tracecompass.rcp.product/tracing.product"
+
+OUTPUT=$(cat $PATH_TO_PRODUCT_FILE  | grep "<repository.*stable.*")
+if [[ -z "$OUTPUT" ]];
+then
+sed -i -E  s/\(\<repository.*\)master\(.*$\)/\\1stable\\2/g $PATH_TO_PRODUCT_FILE
+       CHECK_OUTPUT=$(cat $PATH_TO_PRODUCT_FILE | grep "<repository.*stable.*")
+       if [[ -z "$CHECK_OUTPUT" ]];
+       then
+               echo "Failed!"
+       else
+               echo "Success!"
+       fi
+else
+       echo "Stable update site already set?"
+fi
+
This page took 0.025349 seconds and 5 git commands to generate.