Author: nickboldt
Date: 2010-10-02 02:34:12 -0400 (Sat, 02 Oct 2010)
New Revision: 25429
Added:
trunk/build/target-platform/publish.sh
Log:
publish script for generated target platform repo (built by Hudson)
Added: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh (rev 0)
+++ trunk/build/target-platform/publish.sh 2010-10-02 06:34:12 UTC (rev 25429)
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Hudson creates a repo in ${repoPath}
+# So, copy it into other places for access by downstream jobs and others
+
+repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
+targetFile=e361-wtp322.target
+DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+LOCALDESTNN=/home/hudson/static_build_env/jbds/target-platform
+
+if [[ -d ${repoPath} ]]; then
+ # copy/update into central place for reuse by local downstream build jobs
+ rsync -aPrz --delete ${repoPath}/* ${LOCALDESTNN}/${targetFile}/
+
+ # upload to
http://download.jboss.org/jbossotools/updates/target-platform/latest/ for
public use
+ rsync -aPrz --delete --rsh=ssh ${repoPath}/* ${DESTINATION}/latest/ &
+
+ # create zip, then upload to
http://download.jboss.org/jbossotools/updates/target-platform/${targetFil... for public
use
+ cd ${repoPath} && \
+ zip -q -r9 ../${targetFile}.zip * && \
+ rsync -aPrz --delete --rsh=ssh ${repoPath}/../${targetFile}.zip ${DESTINATION}/
&& \
+ rm -f ${repoPath}/../${targetFile}.zip
+fi