You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by le...@apache.org on 2015/03/12 21:05:34 UTC

svn commit: r1666287 - in /tika/tools: expire.sh tika_ucar_sonatype.sh

Author: lewismc
Date: Thu Mar 12 20:05:34 2015
New Revision: 1666287

URL: http://svn.apache.org/r1666287
Log:
TIKA-1572 Utility script for pushing 3rd Party UCAR Dependencies to Maven Central

Added:
    tika/tools/expire.sh   (with props)
    tika/tools/tika_ucar_sonatype.sh   (with props)

Added: tika/tools/expire.sh
URL: http://svn.apache.org/viewvc/tika/tools/expire.sh?rev=1666287&view=auto
==============================================================================
--- tika/tools/expire.sh (added)
+++ tika/tools/expire.sh Thu Mar 12 20:05:34 2015
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# 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.
+
+if [ $# -lt 2 ]; then
+  echo "Usage: $0 <days> <dirctory> <nowait>"
+  echo "       <days>      - numeric number indicates days prior to expiration"
+  echo "       <directory> - target directory"
+  echo "       <nowait>    - set to \"nowait\" to delete files without confirmation"
+  exit 0;
+fi
+
+if [ "X$3" == "Xnowait" ]; then
+    find $2 -atime +$1 | xargs -i rm {}
+else
+  echo -n "Delete files in $2, last access more than $1 day(s) ago? (y/n) "
+  read q
+  if [ "X$q" == "Xy" ]; then
+    find $2 -atime +$1 | xargs -i rm {}
+  fi
+fi

Propchange: tika/tools/expire.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: tika/tools/tika_ucar_sonatype.sh
URL: http://svn.apache.org/viewvc/tika/tools/tika_ucar_sonatype.sh?rev=1666287&view=auto
==============================================================================
--- tika/tools/tika_ucar_sonatype.sh (added)
+++ tika/tools/tika_ucar_sonatype.sh Thu Mar 12 20:05:34 2015
@@ -0,0 +1,66 @@
+#!/bin/bash
+#
+# 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.
+#
+# This short script is used to publish UCAR dependencies to Maven Central
+# as described at - https://wiki.apache.org/tika/ThirdPartySonaType
+#
+# Publishing the the artifacts can sometimes be time consuming so this
+# saves us a bunch of time.
+#
+# To use the script simply create a directory, and run the script from
+# that directory. This will download the dependencies from the UCAR 
+# repository and sign them.
+#
+# You are then only tasked with manually staging the artifacts in 
+# - https://wiki.apache.org/tika/ThirdPartySonaType#Staging
+
+DEPENDENCY_VERSION="$1"
+ARTIFACT_DIRECTORY="$2"
+
+if [ "$DEPENDENCY_VERSION" = "" ]; then
+	echo "Missing dependency_version : tika_ucar_sonatype.sh <dependency_version> <artifact_directory>"
+	exit -1;
+fi
+
+if [ "$ARTIFACT_DIRECTORY" = "" ]; then
+	echo "Missing dependency_version : tika_ucar_sonatype.sh <dependency_version> <artifact_directory>"
+	exit -1;
+fi
+
+# The UCAR release repository
+UCAR=https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases/edu/ucar/
+# The array of dependencies we wish to grab and sign before staging
+dependency_array=(cdm grib netcdf4 thredds-parent httpservices)
+
+echo "Fetching UCAR artifact items for staging:"
+for item in ${dependency_array[*]}
+do
+    printf "   %s\n" $item
+    wget -P "$ARTIFACT_DIRECTORY" "${UCAR}$item/$DEPENDENCY_VERSION/$item-$DEPENDENCY_VERSION-javadoc.jar"
+    wget -P "$ARTIFACT_DIRECTORY" "${UCAR}$item/$DEPENDENCY_VERSION/$item-$DEPENDENCY_VERSION-sources.jar"
+    wget -P "$ARTIFACT_DIRECTORY" "${UCAR}$item/$DEPENDENCY_VERSION/$item-$DEPENDENCY_VERSION-tests.jar"
+    wget -P "$ARTIFACT_DIRECTORY" "${UCAR}$item/$DEPENDENCY_VERSION/$item-$DEPENDENCY_VERSION.jar"
+    wget -P "$ARTIFACT_DIRECTORY" "${UCAR}$item/$DEPENDENCY_VERSION/$item-$DEPENDENCY_VERSION.pom"
+    mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=edu.ucar -DpomFile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom -Dfile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION-javadoc.jar -Dclassifier=javadoc
+    mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=edu.ucar -DpomFile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom -Dfile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION-sources.jar -Dclassifier=sources
+mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=edu.ucar -DpomFile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom -Dfile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION-tests.jar
+mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=edu.ucar -DpomFile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom -Dfile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.jar
+mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=edu.ucar -DpomFile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom -Dfile="$ARTIFACT_DIRECTORY"$item-$DEPENDENCY_VERSION.pom
+done
+echo "FINISHED: Fetching and signing UCAR artifacts, please progress to https://wiki.apache.org/tika/ThirdPartySonaType#Staging"
+
+

Propchange: tika/tools/tika_ucar_sonatype.sh
------------------------------------------------------------------------------
    svn:executable = *