[plt-dev] Re: "Welcome to a new PLT day."

From: Eli Barzilay (eli at barzilay.org)
Date: Wed May 12 10:57:25 EDT 2010

On May  4, Eli Barzilay wrote:
> This daily commit has always bugged me, and this would be a good
> time to re-thing it.  I think that this is a good way to get rid of
> it:
> * Keep collects/repos-time-stamp, but make it look for the current
>   version as some the date and the sha1, and use that.  (It will
>   look for it in the root, straight from the git files.)
> * If it can't find that, it will use its own source's time stamp.
> * The nightly build will delete this whole thing and hard-wire the
>   information in.
> * Releases don't have the collection, as usual.

This is now done, except for the nightly build hard-wiring the info
in.  It turns out that I can just specify that a magic string gets
replaced whenever `git archive' is used to export the directory[*], so
if the build uses that to get the build directory everything Just
Works.  And it's also nice that guthub does the same processing, which
means that if you grab a .tgz or .zip download from any of these
sources (through our gitweb server, github, or using git directly),
you get the hard-wiring effect.  The only situation where it will
resort to using the file's date is if you deliberately remove the .git
directory, or if you run drracket in some way that makes it not see
the git executable.

[*] `git archive' is close to `svn export' -- you can run it from a
repo or with a repo url, and it spits out a tar or zip[**].  What I
did is specify that in the time stamp file a magic string will be
replaced by the date and commit sha1, which drracket will end up
using.  I also made it avoid .gitjunk files in the archive.

[**] For example, this will get you a clean `plt' source tree:
       git archive --remote=pltgit:plt --prefix=plt/ master | tar xf -

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.