From: Marc-Andre Laperle Date: Tue, 23 Aug 2016 05:35:02 +0000 (-0400) Subject: releng: Move scripts to a subfolder X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=ccefec92e857dd5bc2d8f7afc26d3c66d7d95bef;p=deliverable%2Ftracecompass.git releng: Move scripts to a subfolder As scripts accumulate, it's better to have them under a folder. Change-Id: I53cbb08c19e0ae43c8529f2b3dcbb42a935e187b Signed-off-by: Marc-Andre Laperle Reviewed-on: https://git.eclipse.org/r/79475 Reviewed-by: Hudson CI Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann --- diff --git a/releng/check_mvn_plugin_versions.sh b/releng/check_mvn_plugin_versions.sh deleted file mode 100755 index fb4d75173a..0000000000 --- a/releng/check_mvn_plugin_versions.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################### -# Copyright (c) 2015 Ericsson, EfficiOS Inc. and others -# -# 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 -# -# Contributors: -# Marc-André Laperle - Initial version -# Alexandre Montplaisir - Initial version -############################################################################### - -# Point ourselves to the script's directory (so it can be run "out-of-tree") -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -output=`mvn versions:display-plugin-updates -U -f $DIR/../pom.xml` - -#filter only updates and show unique -summary=`echo "${output}" | grep "\\->" | sort | uniq` -echo -e "Summary:\n${summary}" - -#remove empty lines and count lines -outdatedNb=`echo "${summary}" | sed '/^\s*$/d' | wc -l` -echo Number of outdated plugins: "${outdatedNb}" -exit ${outdatedNb} diff --git a/releng/master_to_stable_release.sh b/releng/master_to_stable_release.sh deleted file mode 100755 index 0f621b37ea..0000000000 --- a/releng/master_to_stable_release.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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/scripts/check_mvn_plugin_versions.sh b/releng/scripts/check_mvn_plugin_versions.sh new file mode 100755 index 0000000000..5a68d036c4 --- /dev/null +++ b/releng/scripts/check_mvn_plugin_versions.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2015 Ericsson, EfficiOS Inc. and others +# +# 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 +# +# Contributors: +# Marc-André Laperle - Initial version +# Alexandre Montplaisir - Initial version +############################################################################### + +# Point ourselves to the script's directory (so it can be run "out-of-tree") +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +output=`mvn versions:display-plugin-updates -U -f $DIR/../../pom.xml` + +#filter only updates and show unique +summary=`echo "${output}" | grep "\\->" | sort | uniq` +echo -e "Summary:\n${summary}" + +#remove empty lines and count lines +outdatedNb=`echo "${summary}" | sed '/^\s*$/d' | wc -l` +echo Number of outdated plugins: "${outdatedNb}" +exit ${outdatedNb} diff --git a/releng/scripts/master_to_stable_release.sh b/releng/scripts/master_to_stable_release.sh new file mode 100755 index 0000000000..0f621b37ea --- /dev/null +++ b/releng/scripts/master_to_stable_release.sh @@ -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/scripts/set_automatic_updates.sh b/releng/scripts/set_automatic_updates.sh new file mode 100755 index 0000000000..91e1a30b45 --- /dev/null +++ b/releng/scripts/set_automatic_updates.sh @@ -0,0 +1,35 @@ +#!/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 automatically update at startup by +# default. This sets the preference through plugin_customization.ini +# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247 + +PATH_TO_PREFERENCE_FILE="../../rcp/org.eclipse.tracecompass.rcp.branding/plugin_customization.ini" + +OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled) +if [[ -z "$OUTPUT" ]]; +then + echo "Setting Automatic update" + echo " +# check for updates every time Trace Compass starts. This should only be done in stable releases. +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247 +org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true" >> $PATH_TO_PREFERENCE_FILE + CHECK_OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled) + if [[ -z "$CHECK_OUTPUT" ]]; + then + echo "Failed!" + else + echo "Success!" + fi +else + echo "Automatic update already set?" +fi + diff --git a/releng/scripts/set_stable_update_site.sh b/releng/scripts/set_stable_update_site.sh new file mode 100755 index 0000000000..00be49acfa --- /dev/null +++ b/releng/scripts/set_stable_update_site.sh @@ -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 " +# org.eclipse.tracecompass +# org.eclipse.tracecompass +#- 2.0.0-SNAPSHOT +#+ 2.0.1-SNAPSHOT +# + +import sys, re +fileContent = open(sys.argv[1]).read() +fileContent = re.sub("" + sys.argv[2] + "-SNAPSHOT(\n\s+)", "" + sys.argv[3] + "-SNAPSHOT\g<1>", fileContent) +open(sys.argv[1], "w").write(fileContent) diff --git a/releng/scripts/update_root_pom_versions.py b/releng/scripts/update_root_pom_versions.py new file mode 100644 index 0000000000..fdc950a84c --- /dev/null +++ b/releng/scripts/update_root_pom_versions.py @@ -0,0 +1,29 @@ +############################################################################### +# 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 +############################################################################### + +#args: filename oldversion newversion + +#Update root pom.xml versions. For example +# org.eclipse.tracecompass +#- 2.0.0-SNAPSHOT +#+ 2.0.1-SNAPSHOT +# +# Also the target plarform: +# +# ${target-platform} +#- 2.0.0-SNAPSHOT +#+ 2.0.1-SNAPSHOT +# + +import sys, re +fileContent = open(sys.argv[1]).read() +fileContent = re.sub("(org.eclipse.tracecompass.*\n\s+)" + sys.argv[2] + "-SNAPSHOT", "\g<1>" + sys.argv[3] + "-SNAPSHOT", fileContent) +# Also the target platform version being used +fileContent = re.sub("" + sys.argv[2] + "-SNAPSHOT(\n\s+)", "" + sys.argv[3] + "-SNAPSHOT\g<1>", fileContent) +open(sys.argv[1], "w").write(fileContent) diff --git a/releng/scripts/update_version.sh b/releng/scripts/update_version.sh new file mode 100755 index 0000000000..ffb6967ca8 --- /dev/null +++ b/releng/scripts/update_version.sh @@ -0,0 +1,39 @@ +############################################################################### +# 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 +############################################################################### + +oldVersion=$1 +newVersion=$2 + +if [ -z "$oldVersion" -o -z "$newVersion" ]; then + echo "usage: $0 oldversion newversion" + exit 1 +fi + +echo Changing $oldVersion to $newVersion + +#Update root pom version +find ../.. -maxdepth 1 -name "pom.xml" -exec python update_root_pom_versions.py {} $oldVersion $newVersion \; +#Update pom.xml with tag with the new version of the root pom +find ../.. -name "pom.xml" -type f -exec python update_parent_pom_versions.py {} $oldVersion $newVersion \; +#Update doc plugin versions +find ../../doc -name "MANIFEST.MF" -exec sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g {} \; + +#Update feature versions (feature.xml) +find ../.. -name "feature.xml" -exec sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g {} \; + +#Update branding plugin manifest.MF +sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g ../../rcp/org.eclipse.tracecompass.rcp.branding/META-INF/MANIFEST.MF +#rcp/org.eclipse.tracecompass.rcp.branding/plugin.xml aboutText +sed -i -e s/$oldVersion/$newVersion/g ../../rcp/org.eclipse.tracecompass.rcp.branding/plugin.xml + +#Update .product rcp/org.eclipse.tracecompass.rcp.product/tracing.product +sed -i -e s/$oldVersion/$newVersion/g ../../rcp/org.eclipse.tracecompass.rcp.product/tracing.product + +#Update rcp.ui plugin rcp/org.eclipse.tracecompass.rcp.ui/META-INF/MANIFEST.MF +sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g ../../rcp/org.eclipse.tracecompass.rcp.ui/META-INF/MANIFEST.MF diff --git a/releng/set_automatic_updates.sh b/releng/set_automatic_updates.sh deleted file mode 100755 index 748315d177..0000000000 --- a/releng/set_automatic_updates.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/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 automatically update at startup by -# default. This sets the preference through plugin_customization.ini -# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247 - -PATH_TO_PREFERENCE_FILE="../rcp/org.eclipse.tracecompass.rcp.branding/plugin_customization.ini" - -OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled) -if [[ -z "$OUTPUT" ]]; -then - echo "Setting Automatic update" - echo " -# check for updates every time Trace Compass starts. This should only be done in stable releases. -# https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247 -org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true" >> $PATH_TO_PREFERENCE_FILE - CHECK_OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled) - if [[ -z "$CHECK_OUTPUT" ]]; - then - echo "Failed!" - else - echo "Success!" - fi -else - echo "Automatic update already set?" -fi - diff --git a/releng/set_stable_update_site.sh b/releng/set_stable_update_site.sh deleted file mode 100755 index 3a00ccf8f0..0000000000 --- a/releng/set_stable_update_site.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 " -# org.eclipse.tracecompass -# org.eclipse.tracecompass -#- 2.0.0-SNAPSHOT -#+ 2.0.1-SNAPSHOT -# - -import sys, re -fileContent = open(sys.argv[1]).read() -fileContent = re.sub("" + sys.argv[2] + "-SNAPSHOT(\n\s+)", "" + sys.argv[3] + "-SNAPSHOT\g<1>", fileContent) -open(sys.argv[1], "w").write(fileContent) diff --git a/releng/update_root_pom_versions.py b/releng/update_root_pom_versions.py deleted file mode 100644 index fdc950a84c..0000000000 --- a/releng/update_root_pom_versions.py +++ /dev/null @@ -1,29 +0,0 @@ -############################################################################### -# 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 -############################################################################### - -#args: filename oldversion newversion - -#Update root pom.xml versions. For example -# org.eclipse.tracecompass -#- 2.0.0-SNAPSHOT -#+ 2.0.1-SNAPSHOT -# -# Also the target plarform: -# -# ${target-platform} -#- 2.0.0-SNAPSHOT -#+ 2.0.1-SNAPSHOT -# - -import sys, re -fileContent = open(sys.argv[1]).read() -fileContent = re.sub("(org.eclipse.tracecompass.*\n\s+)" + sys.argv[2] + "-SNAPSHOT", "\g<1>" + sys.argv[3] + "-SNAPSHOT", fileContent) -# Also the target platform version being used -fileContent = re.sub("" + sys.argv[2] + "-SNAPSHOT(\n\s+)", "" + sys.argv[3] + "-SNAPSHOT\g<1>", fileContent) -open(sys.argv[1], "w").write(fileContent) diff --git a/releng/update_version.sh b/releng/update_version.sh deleted file mode 100755 index 2409e0ddea..0000000000 --- a/releng/update_version.sh +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################### -# 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 -############################################################################### - -oldVersion=$1 -newVersion=$2 - -if [ -z "$oldVersion" -o -z "$newVersion" ]; then - echo "usage: $0 oldversion newversion" - exit 1 -fi - -echo Changing $oldVersion to $newVersion - -#Update root pom version -find .. -maxdepth 1 -name "pom.xml" -exec python update_root_pom_versions.py {} $oldVersion $newVersion \; -#Update pom.xml with tag with the new version of the root pom -find .. -name "pom.xml" -type f -exec python update_parent_pom_versions.py {} $oldVersion $newVersion \; -#Update doc plugin versions -find ../doc -name "MANIFEST.MF" -exec sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g {} \; - -#Update feature versions (feature.xml) -find .. -name "feature.xml" -exec sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g {} \; - -#Update branding plugin manifest.MF -sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g ../rcp/org.eclipse.tracecompass.rcp.branding/META-INF/MANIFEST.MF -#rcp/org.eclipse.tracecompass.rcp.branding/plugin.xml aboutText -sed -i -e s/$oldVersion/$newVersion/g ../rcp/org.eclipse.tracecompass.rcp.branding/plugin.xml - -#Update .product rcp/org.eclipse.tracecompass.rcp.product/tracing.product -sed -i -e s/$oldVersion/$newVersion/g ../rcp/org.eclipse.tracecompass.rcp.product/tracing.product - -#Update rcp.ui plugin rcp/org.eclipse.tracecompass.rcp.ui/META-INF/MANIFEST.MF -sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g ../rcp/org.eclipse.tracecompass.rcp.ui/META-INF/MANIFEST.MF