You are viewing a plain text version of this content. The canonical link for it is here.
Posted to triplesoup-dev@incubator.apache.org by David Reid <da...@jetnet.co.uk> on 2007/02/18 19:24:24 UTC

Re: svn commit: r508946 - in /incubator/triplesoup/code/trunk: release-settings.sh release.sh

leosimons@apache.org wrote:
> Author: leosimons
> Date: Sun Feb 18 11:19:07 2007
> New Revision: 508946
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=508946
> Log:
> Basic release management scripts. Tee-hee.

Getting a bit ambitious aren't we? :-)

> 
> 
> Added:
>     incubator/triplesoup/code/trunk/release-settings.sh   (with props)
>     incubator/triplesoup/code/trunk/release.sh   (with props)
> 
> Added: incubator/triplesoup/code/trunk/release-settings.sh
> URL: http://svn.apache.org/viewvc/incubator/triplesoup/code/trunk/release-settings.sh?view=auto&rev=508946
> ==============================================================================
> --- incubator/triplesoup/code/trunk/release-settings.sh (added)
> +++ incubator/triplesoup/code/trunk/release-settings.sh Sun Feb 18 11:19:07 2007
> @@ -0,0 +1,31 @@
> +#!/usr/bin/env 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.
> +
> +#
> +# Configuration for release.sh
> +#
> +
> +project_name="triplesoup"
> +
> +excludes="committer-legal-howto.txt release-settings.sh release.sh"
> +
> +#releasename="$project_name-r$revision-$currdate"
> +#distserver="people.apache.org"
> +#distserverpath="~/public_html/releases/$project_name"
> +
> 
> Propchange: incubator/triplesoup/code/trunk/release-settings.sh
> ------------------------------------------------------------------------------
>     svn:eol-style = native
> 
> Propchange: incubator/triplesoup/code/trunk/release-settings.sh
> ------------------------------------------------------------------------------
>     svn:executable = *
> 
> Propchange: incubator/triplesoup/code/trunk/release-settings.sh
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision Author HeadURL Id
> 
> Propchange: incubator/triplesoup/code/trunk/release-settings.sh
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
> 
> Added: incubator/triplesoup/code/trunk/release.sh
> URL: http://svn.apache.org/viewvc/incubator/triplesoup/code/trunk/release.sh?view=auto&rev=508946
> ==============================================================================
> --- incubator/triplesoup/code/trunk/release.sh (added)
> +++ incubator/triplesoup/code/trunk/release.sh Sun Feb 18 11:19:07 2007
> @@ -0,0 +1,90 @@
> +#!/usr/bin/env 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.
> +
> +#
> +# Script for creating and tagging a source distribution
> +#
> +
> +
> +### UTILITIES
> +
> +# Print an error message and then exit.
> +function error
> +{
> +  echo "$0: FATAL: $1"
> +  exit 1
> +}
> +
> +
> +### SETUP
> +
> +# default settings
> +project_name="NO_PROJECT"
> +distserver="people.apache.org"
> +excludes=""
> +
> +# detect some settings
> +trunkurl=`svn info | grep 'URL:' | sed 's/URL: //'`
> +[[ "x$trunkurl" == "x" ]] && error "cannot find working copy url"
> +codebase=`echo $trunkurl | sed 's/trunk//'`
> +tagsbase="${codebase}tags"
> +
> +revision=`svn info | grep 'Revision:' | sed 's/Revision: //'`
> +[[ "x$revision" == "x" ]] && error "cannot find working copy revision"
> +currdate=`date +%Y%m%d`
> +[[ "x$currdate" == "x" ]] && error "cannot find current date"
> +
> +# load configuration
> +source release-settings.sh
> +
> +# settings that are based on/overridable by configuration
> +if [[ "x$releasename" == "x" ]]; then
> +  releasename="$project_name-r$revision-$currdate"
> +fi
> +if [[ "x$distserverpath" == "x" ]]; then
> +  distserverpath="~/public_html/releases/$project_name"
> +fi
> +
> +
> +### SAFETY CHECKS
> +
> +# check the tag does not exist yet
> +for tag in `svn ls "$tagsbase"`; do
> +  basetag=`echo "$tag" | sed 's/\///g'`
> +  if [[ "$releasename" == "$basetag" ]]; then
> +    echo "WARNING: tag $tagname already exists within" 'repository!'
> +  fi
> +done
> +
> +
> +### Go!
> +
> +echo svn checkout -q -r "'$revision'" "'$trunkurl'" "'$releasename'"
> +echo cd "'$releasename'"
> +echo rm -rf "'$excludes'"
> +echo cd ..
> +echo tar cjf "'$releasename.tar.bz2'" "'$releasename'"
> +echo md5 "'$releasename.tar.bz2'" '>'  "'$releasename.tar.bz2.md5'"
> +echo gpg --armor --output "'$releasename.tar.bz2.asc'" \
> +        --detach-sig "'$releasename.tar.bz2'"
> +echo svn copy -m "'Tagging release $releasename.'" \
> +        "'$trunkurl'" "'$tagsbase/$releasename'"
> +echo ssh "'$distserver'" mkdir -p "'$distserverpath'"
> +echo scp "'$releasename.tar.bz2' '$releasename.tar.bz2.md5' '$releasename.tar.bz2.asc'" \
> +        "'$distserver:$distserverpath'"
> 
> Propchange: incubator/triplesoup/code/trunk/release.sh
> ------------------------------------------------------------------------------
>     svn:eol-style = native
> 
> Propchange: incubator/triplesoup/code/trunk/release.sh
> ------------------------------------------------------------------------------
>     svn:executable = *
> 
> Propchange: incubator/triplesoup/code/trunk/release.sh
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision Author HeadURL Id
> 
> Propchange: incubator/triplesoup/code/trunk/release.sh
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
> 
> 


Re: svn commit: r508946 - in /incubator/triplesoup/code/trunk: release-settings.sh release.sh

Posted by Leo Simons <ma...@leosimons.com>.
On Feb 18, 2007, at 8:24 PM, David Reid wrote:
> leosimons@apache.org wrote:
>> Author: leosimons
>> Date: Sun Feb 18 11:19:07 2007
>> New Revision: 508946
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=508946
>> Log:
>> Basic release management scripts. Tee-hee.
>
> Getting a bit ambitious aren't we? :-)

Heh :-)

There's actually a bit of sanity to it: I'm trying to get a lot of  
"incubator basics" out of the way as soon as possible so that I can  
focus on more fun things. And since we're pretty much waiting for the  
paperwork to be done, it gives me something to do in the meantime!

After revision 509008, our mighty release.sh script helps to produce  
releases that comply with release policies, incubator policies, legal  
policies, and various apache release process best practices; the fact  
that those releases contain only three files (README.txt, NOTICE.txt,  
LICENSE.txt) is just a small detail ;)

(oh, and this is relevant to incubation, since the Incubator PMC  
tends to be pretty strong on making sure projects dot i's and cross  
t's when doing releases (mostly legal-stuff-related nitpicking).)

ciao!

- Leo