From f115c7a943473ed2ef4c202cd45fe742683bf82f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 9 May 2012 19:48:51 -0600 Subject: [PATCH] Use commit hash instead of (mock) svn rev. When we upgraded to git, we didn't fully change over the way the website and examples are built. The cron job that runs the update script only built the website & examples if the revision returned by the svn interface to the GitHub repo was different than the previously stored revision. At some point, using `svn info` on the repo stopped being reliable. For example, this is what I get when running this today (in 2012): svn info https://github.com/openlayers/openlayers/ Path: openlayers URL: https://github.com/openlayers/openlayers Repository Root: https://github.com/openlayers/openlayers Repository UUID: d631b94f-4ba7-6298-eb8f-ce57b7db7bff Revision: 5488 Node Kind: directory Last Changed Author: schuyler.erle Last Changed Rev: 5488 Last Changed Date: 2006-05-12 12:35:22 -0700 (Fri, 12 May 2006) (Last change looks like it was 6 years ago.) We should be using a proper clone of the git repo and building the website and examples out of this. Until then, we can at least use `git-ls-remote` to check what the latest HEAD from the canonical repo looks like. This should get the website and examples building again (they stopped being updated a few weeks ago). --- tools/update_dev_dir.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh index 1bab6ab513..cfb9814c9d 100755 --- a/tools/update_dev_dir.sh +++ b/tools/update_dev_dir.sh @@ -4,7 +4,7 @@ # Get current 'Last Changed Rev' -GITREV=`svn info https://github.com/openlayers/openlayers/ | grep 'Revision' | awk '{print $2}'` +GITREV=`git ls-remote https://github.com/openlayers/openlayers/ | grep HEAD | awk '{print $1}'` SVNREV=`svn info http://svn.openlayers.org/ | grep 'Revision' | awk '{print $2}'` # Get the last svn rev