From d30e9c5a082357db72e66eb8c84c773fc169b660 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 30 Jan 2012 21:11:50 +0000 Subject: [PATCH] Metadata: various version updates --- common.py | 46 +++++++++++++++++++++- metadata/com.beem.project.beem.txt | 4 +- metadata/com.hughes.android.dictionary.txt | 4 ++ metadata/com.leinardi.kitchentimer.txt | 5 +++ metadata/com.liato.bankdroid.txt | 11 ++---- metadata/org.coolreader.txt | 5 ++- 6 files changed, 61 insertions(+), 14 deletions(-) diff --git a/common.py b/common.py index 45da68c6..4477e0ba 100644 --- a/common.py +++ b/common.py @@ -30,9 +30,11 @@ def getvcs(vcstype, remote, local): elif vcstype == 'git-svn': return vcs_gitsvn(remote, local) elif vcstype == 'hg': - return vcs_hg(remote,local) + return vcs_hg(remote, local) elif vcstype == 'bzr': - return vcs_bzr(remote,local) + return vcs_bzr(remote, local) + elif vcstype == 'srclib': + return vcs_srclib(remote, local) raise VCSException("Invalid vcs type " + vcstype) class vcs: @@ -56,6 +58,7 @@ class vcs: self.remote = remote self.local = local self.refreshed = False + self.srclib = None # Take the local repository to a clean version of the given revision, which # is specificed in the VCS's native format. Beforehand, the repository can @@ -69,6 +72,11 @@ class vcs: def initsubmodules(self): raise VCSException('Submodules not supported for this vcs type') + # Returns the srclib (name, path) used in setting up the current + # revision, or None. + def getsrclib(self): + return self.srclib + class vcs_git(vcs): # If the local directory exists, but is somehow not a git repository, git @@ -243,6 +251,28 @@ class vcs_bzr(vcs): cwd=self.local) != 0: raise VCSException("Bzr revert failed") +class vcs_srclib(vcs): + + def gotorevision(self, rev): + + # Yuk... + extlib_dir = 'build/extlib' + + if os.path.exists(self.local): + shutil.rmtree(self.local) + + if self.remote.find(':') != -1: + srclib, path = self.remote.split(':') + else: + srclib = self.remote + path = None + libdir = getsrclib(srclib + '@' + rev, extlib_dir) + self.srclib = (srclib, libdir) + if path: + libdir = os.path.join(libdir, path) + shutil.copytree(libdir, self.local) + return self.local + # Get the type expected for a given metadata field. def metafieldtype(name): @@ -542,6 +572,8 @@ class MetaDataException(Exception): # Get the specified source library. # Returns the path to it. +# TODO: These are currently just hard-coded in this method. It will be a +# metadata-driven system eventually, but not yet. def getsrclib(spec, extlib_dir): name, ref = spec.split('@') @@ -574,6 +606,12 @@ def getsrclib(spec, extlib_dir): raise BuildException('Error updating FacebookSDK project') return libdir + if name == 'OI': + sdir = os.path.join(extlib_dir, 'OI') + vcs = getvcs('git-svn', + 'http://openintents.googlecode.com/svn/trunk/', sdir) + vcs.gotorevision(ref) + return sdir raise BuildException('Unknown srclib ' + name) @@ -745,6 +783,10 @@ def prepare_source(vcs, app, build, build_dir, extlib_dir, sdk_path, ndk_path, j for lib in build['srclibs'].split(';'): name, _ = lib.split('@') srclibpaths.append((name, getsrclib(lib, extlib_dir))) + basesrclib = vcs.getsrclib() + # If one was used for the main source, add that too. + if basesrclib: + srclibpaths.append(basesrclib) # Run a pre-build command if one is required... if build.has_key('prebuild'): diff --git a/metadata/com.beem.project.beem.txt b/metadata/com.beem.project.beem.txt index d44daa25..31725271 100644 --- a/metadata/com.beem.project.beem.txt +++ b/metadata/com.beem.project.beem.txt @@ -18,6 +18,6 @@ Build Version:0.1.7_rc1,10,0.1.7_rc1,target=android-8 Build Version:0.1.7_rc2,11,0.1.7_rc2,target=android-8 Update Check Mode:Market -Current Version:0.1.7_rc1 -Current Version Code:10 +Current Version:0.1.7_rc2 +Current Version Code:11 diff --git a/metadata/com.hughes.android.dictionary.txt b/metadata/com.hughes.android.dictionary.txt index ecfbdf59..fc30a9b4 100644 --- a/metadata/com.hughes.android.dictionary.txt +++ b/metadata/com.hughes.android.dictionary.txt @@ -22,3 +22,7 @@ cd .. && \ cp -r Util/src . && \ rm -rf Util/ +Update Check Mode:Market +Current Version:3.0.1 +Current Version Code:15 + diff --git a/metadata/com.leinardi.kitchentimer.txt b/metadata/com.leinardi.kitchentimer.txt index 22c4ccd7..89da8933 100644 --- a/metadata/com.leinardi.kitchentimer.txt +++ b/metadata/com.leinardi.kitchentimer.txt @@ -13,4 +13,9 @@ Repo Type:hg Repo:https://code.google.com/p/kitchentimer/ Build Version:1.1.6,116,aec14b3db581 +Build Version:1.2.0,121,!No source code + +Update Check Mode:Market +Current Version:1.2.0 +Current Version Code:121 diff --git a/metadata/com.liato.bankdroid.txt b/metadata/com.liato.bankdroid.txt index dbf176f8..044ca3c6 100644 --- a/metadata/com.liato.bankdroid.txt +++ b/metadata/com.liato.bankdroid.txt @@ -18,20 +18,15 @@ Repo:https://github.com/liato/android-bankdroid.git # work on devices anyway, it would inherit either nothing, or the wrong thing! # Ref: http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b Build Version:1.6.3,102,612aae755a82008f44a6,encoding=utf-8,extlibs=commons-io/commons-io-2.0.1.jar;guava-r08/guava-r08.jar,prebuild=sed -i "s@parent=\"android:WindowTitleBackground\"@@" res/values/styles.xml - Build Version:1.7.2,110,fec08e34a157a3e0b455,encoding=utf-8,extlibs=commons-io/commons-io-2.0.1.jar;guava-r08/guava-r08.jar,prebuild=sed -i "s@parent=\"android:WindowTitleBackground\"@@" res/values/styles.xml - Build Version:1.7.3,115,!a08cab7e66c70e7b0f5c but wrong version code in repo - Build Version:1.8.0,120,899e4b957e512bf55254,encoding=utf-8,extlibs=commons-io/commons-io-2.0.1.jar;guava-r08/guava-r08.jar,prebuild=sed -i "s@parent=\"android:WindowTitleBackground\"@@" res/values/styles.xml - Build Version:1.8.1,121,b5f637bbb301aa2fe997c9f3367cfb144d158633,encoding=utf-8,extlibs=commons-io/commons-io-2.0.1.jar;guava-r08/guava-r08.jar,prebuild=sed -i "s@parent=\"android:WindowTitleBackground\"@@" res/values/styles.xml - Build Version:1.8.1,121,9f626b0dedb01cb90a16fb127a041c5f3dd1c579,target=android-10,encoding=utf-8,extlibs=commons-io/commons-io-2.0.1.jar;guava-r08/guava-r08.jar,prebuild=sed -i "s@parent=\"android:WindowTitleBackground\"@@" res/values/styles.xml - Build Version:1.8.5,128,263023cd883da7b12c94cb46b9d3fdd23068446c,target=android-11,encoding=utf-8,prebuild=mv lib libs +Build Version:1.8.5,128,e6582cc4249e2d6ba6a8630322a5dc26e54d35ff,target=android-11,encoding=utf-8,prebuild=mv lib libs Update Check Mode:Market -Current Version:1.8.5 -Current Version Code:128 +Current Version:1.8.7 +Current Version Code:131 diff --git a/metadata/org.coolreader.txt b/metadata/org.coolreader.txt index 1a185911..945d1846 100644 --- a/metadata/org.coolreader.txt +++ b/metadata/org.coolreader.txt @@ -55,8 +55,9 @@ Build Version:3.0.54-47,447,cr3.0.54-47,subdir=android,rm=android/build.properti Build Version:3.0.55-5,505,cr3.0.55-5,subdir=android,rm=android/build.properties,buildjni=yes Build Version:3.0.55-9,509,cr3.0.55-9,subdir=android,rm=android/build.properties,buildjni=yes Build Version:3.0.55-14,514,cr3.0.55-14,subdir=android,rm=android/build.properties,buildjni=yes +Build Version:3.0.55-30,530,cr3.0.55-30,subdir=android,rm=android/ant.properties,buildjni=yes Update Check Mode:Market -Current Version:3.0.55-14 -Current Version Code:514 +Current Version:3.0.55-30 +Current Version Code:530