You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2010/02/16 15:44:15 UTC

svn commit: r910539 - in /camel/scripts: check_camel_release.sh publish_camel_distro.sh

Author: hadrian
Date: Tue Feb 16 14:44:14 2010
New Revision: 910539

URL: http://svn.apache.org/viewvc?rev=910539&view=rev
Log:
Fix script for publishing camel schemas

Added:
    camel/scripts/publish_camel_distro.sh   (with props)
Modified:
    camel/scripts/check_camel_release.sh

Modified: camel/scripts/check_camel_release.sh
URL: http://svn.apache.org/viewvc/camel/scripts/check_camel_release.sh?rev=910539&r1=910538&r2=910539&view=diff
==============================================================================
--- camel/scripts/check_camel_release.sh (original)
+++ camel/scripts/check_camel_release.sh Tue Feb 16 14:44:14 2010
@@ -1,5 +1,20 @@
 #!/bin/sh
 
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 STAGING=${1}
 DOWNLOAD=${2:-/tmp/camel-staging}
 mkdir ${DOWNLOAD} 2>/dev/null

Added: camel/scripts/publish_camel_distro.sh
URL: http://svn.apache.org/viewvc/camel/scripts/publish_camel_distro.sh?rev=910539&view=auto
==============================================================================
--- camel/scripts/publish_camel_distro.sh (added)
+++ camel/scripts/publish_camel_distro.sh Tue Feb 16 14:44:14 2010
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#  
+#  http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+VERSION=${1}
+DOWNLOAD=${2:-/tmp/camel-release}
+mkdir ${DOWNLOAD} 2>/dev/null
+
+# The following component contain schema definitions that must be published
+# The camel-rest component is no longer used in 2.x and should be removed after 1.x is no longer supported
+RUNDIR=$(cd ${0%/*} && echo $PWD)
+COMPLIST=( "camel-spring:spring" "camel-cxf:cxf" "camel-osgi:osgi"
+  "camel-rest:rest" "camel-spring-integration:spring/integration" )
+DIST_DIR="/www/www.apache.org/dist"
+SITE_DIR="/www/camel.apache.org"
+
+if [ -z "${VERSION}" -o ! -d "${DOWNLOAD}" ]
+then
+ echo "Usage: publish_camel-distro.sh <camel-version> [temp-directory]"
+ exit
+fi
+
+
+echo "################################################################################"
+echo "                  DOWNLOADING DISTRO FROM APACHE REPOSITORY                     "
+echo "################################################################################"
+echo "${DOWNLOAD}/${VERSION}"
+
+wget --no-check-certificate \
+ -r -np "--reject=html,txt" "--follow-tags=" \
+ -P "${DOWNLOAD}/${VERSION}" -nH "--cut-dirs=3" --ignore-length \
+ "http://repository.apache.org/content/repositories/releases/org/apache/camel/apache-camel/${VERSION}/"
+
+echo "################################################################################"
+echo "               DOWNLOADING COMPONENTS FROM APACHE REPOSITORY                    "
+echo "################################################################################"
+for comp in ${COMPLIST[*]}; do
+  src=${comp%:*}
+  dest=${comp#*:}
+  wget --no-check-certificate \
+    -r -np "--reject=html,txt" "--accept=xsd" "--follow-tags=" \
+    -P "${DOWNLOAD}/${VERSION}" -nH "--cut-dirs=3" "--ignore-length" \
+    "https://repository.apache.org/content/repositories/releases/org/apache/camel/${src}/${VERSION}/"
+done
+
+echo "################################################################################"
+echo "                         RESET GROUP PERMISSIONS                                "
+echo "################################################################################"
+# Make sure to give appropriate permissions to the camel group
+chown -R :camel ${DOWNLOAD}/${VERSION}
+chmod -R g+w ${DOWNLOAD}/${VERSION}
+echo "DONE"
+
+echo "################################################################################"
+echo "               MOVE DISTRO TO OFFICIAL APACHE MIRROR REPO                       "
+echo "################################################################################"
+# Move distro to the correct location
+mv "${DOWNLOAD}/${VERSION}/org/apache/camel/apache-camel/${VERSION}" "${DIST_DIR}/camel/apache-camel/"
+echo "DONE"
+
+echo "################################################################################"
+echo "                           PUBLISH CAMEL SCHEMAS                                "
+echo "################################################################################"
+for comp in ${COMPLIST[*]}; do
+  src=${comp%:*}
+  dest=${comp#*:}
+  cp "${DOWNLOAD}/${VERSION}/org/apache/camel/${src}/${VERSION}/*.xsd" "${SITE_DIR}/${dest}/"
+  update_latest_released_schema("${SITE_DIR}/${dest}/")
+done
+
+echo "DONE"

Propchange: camel/scripts/publish_camel_distro.sh
------------------------------------------------------------------------------
    svn:executable = *