Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2013-12-10 03:54:41 -0500
committerPierre-Charles David2013-12-10 03:54:41 -0500
commit2946da1191181e248282f094e554f27d642d3d06 (patch)
tree5b1c3bbbe7a275d991fb921673879234a7613e7e
parent43f93d2b9249ba8891fd0afed080d0948799286e (diff)
downloadorg.eclipse.sirius-2946da1191181e248282f094e554f27d642d3d06.tar.gz
org.eclipse.sirius-2946da1191181e248282f094e554f27d642d3d06.tar.xz
org.eclipse.sirius-2946da1191181e248282f094e554f27d642d3d06.zip
[422069] Improve publication script
Change-Id: If7ee277cf02b2966c04bcab91b94bc40c75c3282 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rwxr-xr-xreleng/org.eclipse.sirius.releng/publish-nightly.sh32
1 files changed, 19 insertions, 13 deletions
diff --git a/releng/org.eclipse.sirius.releng/publish-nightly.sh b/releng/org.eclipse.sirius.releng/publish-nightly.sh
index 02fba9b275..bfbaecf6fa 100755
--- a/releng/org.eclipse.sirius.releng/publish-nightly.sh
+++ b/releng/org.eclipse.sirius.releng/publish-nightly.sh
@@ -78,39 +78,45 @@ env | sort > "$TARGET_DIR/build_env.txt"
# Setup or update the redirects (implemented as composite repos)
######################################################################
-# First, a link for the $VERSION (e.g. "1.2.0/luna" => "1.2.0-NYYYYMMDD-HHMM/luna")
-mkdir -p "$TARGET_ROOT/$VERSION/$PLATFORM"
-cat > "$TARGET_ROOT/$VERSION/$PLATFORM/compositeArtifacts.xml" <<EOF
+# Create a p2 composite repo to setup a redirect
+create_redirect() {
+ FROM="$1"
+ TO="$2"
+
+ mkdir -p "$FROM"
+ cat > "$FROM/compositeArtifacts.xml" <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
-<repository name='&quot;Eclipse Sirius Test Site&quot;'
- type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
+<repository name='Eclipse Sirius' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='$P2_TIMESTAMP'/>
</properties>
<children size='1'>
- <child location='http://download.eclipse.org/sirius/updates/$BUILD_TYPE/$FULL_VERSION/$PLATFORM'/>
+ <child location='http://download.eclipse.org/sirius/updates/$TO'/>
</children>
</repository>
EOF
-cat > "$TARGET_ROOT/$VERSION/$PLATFORM/compositeContent.xml" <<EOF
+ cat > "$FROM/compositeContent.xml" <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
-<repository name='&quot;Eclipse Sirius&quot;'
- type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+<repository name='Eclipse Sirius' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='$P2_TIMESTAMP'/>
</properties>
<children size='1'>
- <child location='http://download.eclipse.org/sirius/updates/$BUILD_TYPE/$FULL_VERSION/$PLATFORM'/>
+ <child location='http://download.eclipse.org/sirius/updates/$TO'/>
</children>
</repository>
EOF
+
+}
+# First, a link for the $VERSION (e.g. "1.2.0/luna" => "1.2.0-NYYYYMMDD-HHMM/luna")
+create_redirect "$TARGET_ROOT/$VERSION/$PLATFORM" "$BUILD_TYPE/$FULL_VERSION/$PLATFORM"
+# Also create a link for the $STREAM (e.g. "1.2.x/luna" => "1.2.0-NYYYYMMDD-HHMM/luna")
+create_redirect "$TARGET_ROOT/$STREAM/$PLATFORM" "$BUILD_TYPE/$FULL_VERSION/$PLATFORM"
# Also update the global "latest" links if we are building master
if [ "master" = "$GIT_BRANCH" ]; then
- mkdir -p "$TARGET_ROOT/latest/$PLATFORM"
- cp "$TARGET_ROOT/$VERSION/$PLATFORM/compositeArtifacts.xml" "$TARGET_ROOT/latest/$PLATFORM"
- cp "$TARGET_ROOT/$VERSION/$PLATFORM/compositeContent.xml" "$TARGET_ROOT/latest/$PLATFORM"
+ create_redirect "$TARGET_ROOT/latest/$PLATFORM" "$BUILD_TYPE/$FULL_VERSION/$PLATFORM"
fi

Back to the top