You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Hyrum K Wright <hy...@hyrumwright.org> on 2011/04/05 05:37:49 UTC

Re: svn commit: r1088873 - /subversion/trunk/tools/dist/nightly.sh

The files themselves used to be named with the revision number, but
this was removed so that automated tools could have a static URL from
which to grab the latest version.

While I don't think this change itself is particularly bad, I would
like to maintain the above invariant.  Perhaps symlinking the most
recent artifacts to their pre-r1088873 locations?

-Hyrum

On Mon, Apr 4, 2011 at 10:16 PM,  <da...@apache.org> wrote:
> Author: danielsh
> Date: Tue Apr  5 03:16:26 2011
> New Revision: 1088873
>
> URL: http://svn.apache.org/viewvc?rev=1088873&view=rev
> Log:
> * tools/dist/nightly.sh:
>   Add revnum-named subdirs under the dist/ dir, to allow include N old builds,
>   and add logic to prune builds older than (by default) a week.
>
> This is an incompatible change --- the revnum-named dir was not previously
> in the resulting URLs to the files.
>
> Modified:
>    subversion/trunk/tools/dist/nightly.sh
>
> Modified: subversion/trunk/tools/dist/nightly.sh
> URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/nightly.sh?rev=1088873&r1=1088872&r2=1088873&view=diff
> ==============================================================================
> --- subversion/trunk/tools/dist/nightly.sh (original)
> +++ subversion/trunk/tools/dist/nightly.sh Tue Apr  5 03:16:26 2011
> @@ -23,14 +23,16 @@ set -e
>
>  repo=http://svn.apache.org/repos/asf/subversion
>  svn=svn
> +olds=7
>
>  # Parse our arguments
> -while getopts "cd:t:s:" flag; do
> +while getopts "cd:t:s:o:" flag; do
>   case $flag in
>     d) dir="`cd $OPTARG && pwd`" ;; # abspath
>     c) clean="1" ;;
>     t) target="$OPTARG" ;;
>     s) svn="$OPTARG" ;;
> +    o) olds="$OPTARG" ;;
>   esac
>  done
>
> @@ -75,9 +77,15 @@ cd ..
>  echo '-------------------moving results---------------------'
>  if [ -f "$target/index.html" ]; then rm "$target/index.html"; fi
>  mv index.html "$target"
> -if [ -d "$target/dist" ]; then rm -r "$target/dist"; fi
> +if [ ! -d "$target/dist" ]; then mkdir "$target/dist"; fi
> +if [ -d "$target/dist/r$head" ]; then rm -r "$target/dist/r$head"; fi
>  rm -r roll/deploy/to-tigris
> -mv roll/deploy "$target/dist"
> +mv roll/deploy "$target/dist/r$head"
> +
> +# Clean up old results
> +ls -t1 "$target/dist/" | sed -e "1,${olds}d" | while read d; do
> +  rm -rf "$target/dist/$d"
> +done
>
>  # Optionally remove our working directory
>  if [ -n "$clean" ]; then
>
>
>

Re: svn commit: r1088873 - /subversion/trunk/tools/dist/nightly.sh

Posted by Daniel Shahaf <da...@apache.org>.
Hyrum K Wright wrote on Mon, Apr 04, 2011 at 22:37:49 -0500:
> The files themselves used to be named with the revision number, but
> this was removed so that automated tools could have a static URL from
> which to grab the latest version.
> 
> While I don't think this change itself is particularly bad, I would
> like to maintain the above invariant.  Perhaps symlinking the most
> recent artifacts to their pre-r1088873 locations?
> 

r1088882:

[[[
Index: nightly.sh
===================================================================
--- nightly.sh	(revision 1088878)
+++ nightly.sh	(working copy)
@@ -82,6 +82,12 @@
 rm -r roll/deploy/to-tigris
 mv roll/deploy "$target/dist/r$head"
 
+# Some static links for the most recent artefacts.
+ln -sf "r$head" "$target/dist/current"
+ls "$target/dist/r$head" | while read fname; do
+  ln -s "r$head/$fname" "$target/dist/$fname"
+done
+
 # Clean up old results
 ls -t1 "$target/dist/" | sed -e "1,${olds}d" | while read d; do
   rm -rf "$target/dist/$d"
]]]

> -Hyrum
> 
> On Mon, Apr 4, 2011 at 10:16 PM,  <da...@apache.org> wrote:
> > Author: danielsh
> > Date: Tue Apr  5 03:16:26 2011
> > New Revision: 1088873
> >
> > URL: http://svn.apache.org/viewvc?rev=1088873&view=rev
> > Log:
> > * tools/dist/nightly.sh:
> >   Add revnum-named subdirs under the dist/ dir, to allow include N old builds,
> >   and add logic to prune builds older than (by default) a week.
> >
> > This is an incompatible change --- the revnum-named dir was not previously
> > in the resulting URLs to the files.
> >
> > Modified:
> >    subversion/trunk/tools/dist/nightly.sh
> >
> > Modified: subversion/trunk/tools/dist/nightly.sh
> > URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/nightly.sh?rev=1088873&r1=1088872&r2=1088873&view=diff
> > ==============================================================================
> > --- subversion/trunk/tools/dist/nightly.sh (original)
> > +++ subversion/trunk/tools/dist/nightly.sh Tue Apr  5 03:16:26 2011
> > @@ -23,14 +23,16 @@ set -e
> >
> >  repo=http://svn.apache.org/repos/asf/subversion
> >  svn=svn
> > +olds=7
> >
> >  # Parse our arguments
> > -while getopts "cd:t:s:" flag; do
> > +while getopts "cd:t:s:o:" flag; do
> >   case $flag in
> >     d) dir="`cd $OPTARG && pwd`" ;; # abspath
> >     c) clean="1" ;;
> >     t) target="$OPTARG" ;;
> >     s) svn="$OPTARG" ;;
> > +    o) olds="$OPTARG" ;;
> >   esac
> >  done
> >
> > @@ -75,9 +77,15 @@ cd ..
> >  echo '-------------------moving results---------------------'
> >  if [ -f "$target/index.html" ]; then rm "$target/index.html"; fi
> >  mv index.html "$target"
> > -if [ -d "$target/dist" ]; then rm -r "$target/dist"; fi
> > +if [ ! -d "$target/dist" ]; then mkdir "$target/dist"; fi
> > +if [ -d "$target/dist/r$head" ]; then rm -r "$target/dist/r$head"; fi
> >  rm -r roll/deploy/to-tigris
> > -mv roll/deploy "$target/dist"
> > +mv roll/deploy "$target/dist/r$head"
> > +
> > +# Clean up old results
> > +ls -t1 "$target/dist/" | sed -e "1,${olds}d" | while read d; do
> > +  rm -rf "$target/dist/$d"
> > +done
> >
> >  # Optionally remove our working directory
> >  if [ -n "$clean" ]; then
> >
> >
> >

Re: svn commit: r1088873 - /subversion/trunk/tools/dist/nightly.sh

Posted by Daniel Shahaf <da...@apache.org>.
Hyrum K Wright wrote on Mon, Apr 04, 2011 at 22:37:49 -0500:
> The files themselves used to be named with the revision number, but
> this was removed so that automated tools could have a static URL from
> which to grab the latest version.
> 
> While I don't think this change itself is particularly bad, I would
> like to maintain the above invariant.  Perhaps symlinking the most
> recent artifacts to their pre-r1088873 locations?
> 

r1088882:

[[[
Index: nightly.sh
===================================================================
--- nightly.sh	(revision 1088878)
+++ nightly.sh	(working copy)
@@ -82,6 +82,12 @@
 rm -r roll/deploy/to-tigris
 mv roll/deploy "$target/dist/r$head"
 
+# Some static links for the most recent artefacts.
+ln -sf "r$head" "$target/dist/current"
+ls "$target/dist/r$head" | while read fname; do
+  ln -s "r$head/$fname" "$target/dist/$fname"
+done
+
 # Clean up old results
 ls -t1 "$target/dist/" | sed -e "1,${olds}d" | while read d; do
   rm -rf "$target/dist/$d"
]]]

> -Hyrum
> 
> On Mon, Apr 4, 2011 at 10:16 PM,  <da...@apache.org> wrote:
> > Author: danielsh
> > Date: Tue Apr  5 03:16:26 2011
> > New Revision: 1088873
> >
> > URL: http://svn.apache.org/viewvc?rev=1088873&view=rev
> > Log:
> > * tools/dist/nightly.sh:
> >   Add revnum-named subdirs under the dist/ dir, to allow include N old builds,
> >   and add logic to prune builds older than (by default) a week.
> >
> > This is an incompatible change --- the revnum-named dir was not previously
> > in the resulting URLs to the files.
> >
> > Modified:
> >    subversion/trunk/tools/dist/nightly.sh
> >
> > Modified: subversion/trunk/tools/dist/nightly.sh
> > URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/nightly.sh?rev=1088873&r1=1088872&r2=1088873&view=diff
> > ==============================================================================
> > --- subversion/trunk/tools/dist/nightly.sh (original)
> > +++ subversion/trunk/tools/dist/nightly.sh Tue Apr  5 03:16:26 2011
> > @@ -23,14 +23,16 @@ set -e
> >
> >  repo=http://svn.apache.org/repos/asf/subversion
> >  svn=svn
> > +olds=7
> >
> >  # Parse our arguments
> > -while getopts "cd:t:s:" flag; do
> > +while getopts "cd:t:s:o:" flag; do
> >   case $flag in
> >     d) dir="`cd $OPTARG && pwd`" ;; # abspath
> >     c) clean="1" ;;
> >     t) target="$OPTARG" ;;
> >     s) svn="$OPTARG" ;;
> > +    o) olds="$OPTARG" ;;
> >   esac
> >  done
> >
> > @@ -75,9 +77,15 @@ cd ..
> >  echo '-------------------moving results---------------------'
> >  if [ -f "$target/index.html" ]; then rm "$target/index.html"; fi
> >  mv index.html "$target"
> > -if [ -d "$target/dist" ]; then rm -r "$target/dist"; fi
> > +if [ ! -d "$target/dist" ]; then mkdir "$target/dist"; fi
> > +if [ -d "$target/dist/r$head" ]; then rm -r "$target/dist/r$head"; fi
> >  rm -r roll/deploy/to-tigris
> > -mv roll/deploy "$target/dist"
> > +mv roll/deploy "$target/dist/r$head"
> > +
> > +# Clean up old results
> > +ls -t1 "$target/dist/" | sed -e "1,${olds}d" | while read d; do
> > +  rm -rf "$target/dist/$d"
> > +done
> >
> >  # Optionally remove our working directory
> >  if [ -n "$clean" ]; then
> >
> >
> >