mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-13 02:30:11 +01:00
Various fixes: hg vcs updating, gradle vercode regex...
This commit is contained in:
parent
e07d35f913
commit
5644b17048
@ -119,7 +119,8 @@ def check_tags(app, sdk_path):
|
||||
paths = common.manifest_paths(build_dir, flavour)
|
||||
version, vercode, package = common.parse_androidmanifests(paths)
|
||||
if package and package == app['id'] and version and vercode:
|
||||
print "Manifest exists. Found version %s" % version
|
||||
print "Manifest exists. Found version %s (%s)" % (
|
||||
version, vercode)
|
||||
if int(vercode) > int(hcode):
|
||||
htag = tag
|
||||
hcode = str(int(vercode))
|
||||
@ -334,6 +335,7 @@ def main():
|
||||
|
||||
tag = None
|
||||
msg = None
|
||||
vercode = None
|
||||
mode = app['Update Check Mode']
|
||||
if mode == 'Tags':
|
||||
(version, vercode, tag) = check_tags(app, config['sdk_path'])
|
||||
|
@ -385,7 +385,7 @@ class vcs_hg(vcs):
|
||||
if subprocess.call(['hg', 'clone', self.remote, self.local]) !=0:
|
||||
raise VCSException("Hg clone failed")
|
||||
else:
|
||||
if subprocess.call('hg status -u | xargs rm -rf',
|
||||
if subprocess.call('hg status -uS | xargs rm -rf',
|
||||
cwd=self.local, shell=True) != 0:
|
||||
raise VCSException("Hg clean failed")
|
||||
if not self.refreshed:
|
||||
@ -395,11 +395,11 @@ class vcs_hg(vcs):
|
||||
self.refreshed = True
|
||||
|
||||
rev = str(rev if rev else 'default')
|
||||
if rev:
|
||||
revargs = [rev]
|
||||
if subprocess.call(['hg', 'checkout', '-C'] + revargs,
|
||||
cwd=self.local) != 0:
|
||||
raise VCSException("Hg checkout failed")
|
||||
if not rev:
|
||||
return
|
||||
if subprocess.call(['hg', 'update', '-C', rev],
|
||||
cwd=self.local) != 0:
|
||||
raise VCSException("Hg checkout failed")
|
||||
|
||||
def gettags(self):
|
||||
p = subprocess.Popen(['hg', 'tags', '-q'],
|
||||
@ -1111,7 +1111,7 @@ def parse_androidmanifests(paths):
|
||||
vnsearch = re.compile(r'.*android:versionName="([^"]+?)".*').search
|
||||
psearch = re.compile(r'.*package="([^"]+)".*').search
|
||||
|
||||
vcsearch_g = re.compile(r'.*versionCode[ =]*([0-9]+?).*').search
|
||||
vcsearch_g = re.compile(r'.*versionCode[ =]*([0-9]+?)[^\d].*').search
|
||||
vnsearch_g = re.compile(r'.*versionName[ =]*"([^"]+?)".*').search
|
||||
psearch_g = re.compile(r'.*packageName[ =]*"([^"]+)".*').search
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user