From 107bed5dd443d872caf6d1c2500c67bdee44db0d Mon Sep 17 00:00:00 2001 From: blundellc Date: Sat, 13 Sep 2008 13:26:51 +0000 Subject: [PATCH] revert to using git commit id in zzz.R; git $Id$ is not the same as CVS $Id$ git $Id$ binds to the identity of the resident object, not of the ocmmit. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@126 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- pkg/trunk/.gitattributes | 1 - pkg/trunk/R/{zzz.R => zzz.R.in} | 5 +++-- pkg/trunk/configure | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) delete mode 100644 pkg/trunk/.gitattributes rename pkg/trunk/R/{zzz.R => zzz.R.in} (90%) create mode 100755 pkg/trunk/configure diff --git a/pkg/trunk/.gitattributes b/pkg/trunk/.gitattributes deleted file mode 100644 index de1c092..0000000 --- a/pkg/trunk/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -R/zzz.R ident diff --git a/pkg/trunk/R/zzz.R b/pkg/trunk/R/zzz.R.in similarity index 90% rename from pkg/trunk/R/zzz.R rename to pkg/trunk/R/zzz.R.in index 86dbe1e..e486f50 100644 --- a/pkg/trunk/R/zzz.R +++ b/pkg/trunk/R/zzz.R.in @@ -7,9 +7,10 @@ global("pbuilder_config", '/etc/cran2deb/pbuilderrc') global("dput_config", '/etc/cran2deb/dput.cf') global("dinstall_config", '/etc/cran2deb/mini-dinstall.conf') - global("dinstall_archive", '/etc/cran2deb/archive')) + global("dinstall_archive", '/etc/cran2deb/archive') global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances - global("git_revision","$Id$") + # git_revision { + # git_revision } global("changesfile", function(srcname,version='*') { return(file.path(pbuilder_results ,paste(srcname,'_',version,'_' diff --git a/pkg/trunk/configure b/pkg/trunk/configure new file mode 100755 index 0000000..106c58a --- /dev/null +++ b/pkg/trunk/configure @@ -0,0 +1,11 @@ +#!/bin/sh +# stamp the source with the originating git revision. +git_rev=$(git show --pretty'=oneline' 'HEAD' | head -n1 | cut -f1 -d' ') +#git_r='assign("git_revision","'$git_rev'",envir=.GlobalEnv)' +git_r=' global("git_revision","'$git_rev'")' + +awk -v "git_r=$git_r" ' +/# git_revision }/ {suppress=0} +suppress == 0 {print} +/# git_revision {/ {print git_r; suppress=1} +' R/zzz.R -- 2.39.5