,',deb_revision INTEGER NOT NULL'
,',db_version INTEGER NOT NULL'
,',date_stamp TEXT NOT NULL'
- ,',git_revision TEXT NOT NULL'
+ ,',git_revision TEXT NOT NULL' # legacy: really scm_revision
,',success INTEGER NOT NULL'
,',log TEXT'
,',UNIQUE(package,r_version,deb_epoch,deb_revision,db_version)'
,',',db_cur_version(con)
,',',as.integer(success)
,',',db_quote(format(Sys.time(),'%a, %d %b %Y %H:%M:%S %z'))
- ,',',db_quote(git_revision)
+ ,',',db_quote(scm_revision)
,',',db_quote(paste(log, collapse='\n'))
,')'))
db_stop(con)
,deb_revision = version_revision(pkg$debversion)
,db_version = db_get_version()
,date_stamp = pkg$date_stamp
- ,git_revision = git_revision
+ ,git_revision = scm_revision
,success = 1 # never used
,log = '' # never used
)
--- /dev/null
+.First.lib <- function(libname, pkgname) {
+ global <- function(name,value) assign(name,value,envir=.GlobalEnv)
+ global("maintainer", 'cran2deb autobuild <cran2deb@example.org>')
+ global("root", system.file(package='cran2deb'))
+ global("cache_root", '/var/cache/cran2deb')
+ global("pbuilder_results", '/var/cache/cran2deb/results')
+ 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("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances
+ global("scm_revision", 'svn:$Id$')
+ global("changesfile", function(srcname,version='*') {
+ return(file.path(pbuilder_results
+ ,paste(srcname,'_',version,'_'
+ ,host_arch(),'.changes',sep='')))
+ })
+
+ cache <- file.path(cache_root,'cache.rda')
+ if (file.exists(cache)) {
+ load(cache,envir=.GlobalEnv)
+ }
+}
+++ /dev/null
-.First.lib <- function(libname, pkgname) {
- global <- function(name,value) assign(name,value,envir=.GlobalEnv)
- global("maintainer", 'cran2deb autobuild <cran2deb@example.org>')
- global("root", system.file(package='cran2deb'))
- global("cache_root", '/var/cache/cran2deb')
- global("pbuilder_results", '/var/cache/cran2deb/results')
- 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("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances
- # git_revision {
- # git_revision }
- global("changesfile", function(srcname,version='*') {
- return(file.path(pbuilder_results
- ,paste(srcname,'_',version,'_'
- ,host_arch(),'.changes',sep='')))
- })
-
- cache <- file.path(cache_root,'cache.rda')
- if (file.exists(cache)) {
- load(cache,envir=.GlobalEnv)
- }
-}
+++ /dev/null
-#!/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.in >R/zzz.R