mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Merge branch 'master' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
b1c90ace71
@ -13,3 +13,25 @@ if node['kernel']['machine'] == "x86_64"
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
script "install-gradle" do
|
||||||
|
cwd "/tmp"
|
||||||
|
interpreter "bash"
|
||||||
|
code "
|
||||||
|
unzip /vagrant/cache/gradle-1.7-bin.zip
|
||||||
|
mv gradle-1.7 /opt/gradle
|
||||||
|
"
|
||||||
|
not_if "test -d /opt/gradle"
|
||||||
|
end
|
||||||
|
|
||||||
|
execute "add-gradle-home" do
|
||||||
|
user user
|
||||||
|
command "echo \"export GRADLE_HOME=/opt/gradle\" >> /home/#{user}/.bashrc"
|
||||||
|
not_if "grep GRADLE_HOME /home/#{user}/.bashrc"
|
||||||
|
end
|
||||||
|
execute "add-gradle-bin" do
|
||||||
|
user user
|
||||||
|
command "echo \"export PATH=$PATH:/opt/gradle/bin\" >> /home/#{user}/.bashrc"
|
||||||
|
not_if "grep gradle/bin /home/#{user}/.bashrc"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,7 +145,13 @@ def check_repomanifest(app, sdk_path, branch=None):
|
|||||||
if not os.path.isdir(build_dir):
|
if not os.path.isdir(build_dir):
|
||||||
return (None, "Subdir '" + app['builds'][-1]['subdir'] + "'is not a valid directory")
|
return (None, "Subdir '" + app['builds'][-1]['subdir'] + "'is not a valid directory")
|
||||||
|
|
||||||
version, vercode, package = common.parse_androidmanifest(build_dir)
|
if os.path.exists(os.path.join(build_dir, 'AndroidManifest.xml')):
|
||||||
|
version, vercode, package = common.parse_androidmanifest(build_dir)
|
||||||
|
elif os.path.exists(os.path.join(build_dir, 'src', 'main', 'AndroidManifest.xml')):
|
||||||
|
# Alternate location for simple gradle locations...
|
||||||
|
version, vercode, package = common.parse_androidmanifest(os.path.join(build_dir, 'src', 'main'))
|
||||||
|
else:
|
||||||
|
return (None, "AndroidManifest.xml not found")
|
||||||
if not package:
|
if not package:
|
||||||
return (None, "Couldn't find package ID")
|
return (None, "Couldn't find package ID")
|
||||||
if package != app['id']:
|
if package != app['id']:
|
||||||
|
@ -49,22 +49,38 @@ if not os.path.exists(cachedir):
|
|||||||
os.mkdir(cachedir)
|
os.mkdir(cachedir)
|
||||||
cachefiles = [
|
cachefiles = [
|
||||||
('android-sdk_r21.0.1-linux.tgz',
|
('android-sdk_r21.0.1-linux.tgz',
|
||||||
'http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz')]
|
'http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz',
|
||||||
|
None),
|
||||||
|
('gradle-1.7-bin.zip',
|
||||||
|
'http://services.gradle.org/distributions/gradle-1.7-bin.zip',
|
||||||
|
'360c97d51621b5a1ecf66748c718594e5f790ae4fbc1499543e0c006033c9d30')]
|
||||||
if arch64:
|
if arch64:
|
||||||
cachefiles.extend([
|
cachefiles.extend([
|
||||||
('android-ndk-r8e-linux-x86_64.tar.bz2',
|
('android-ndk-r8e-linux-x86_64.tar.bz2',
|
||||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2')])
|
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2',
|
||||||
|
None)])
|
||||||
else:
|
else:
|
||||||
cachefiles.extend([
|
cachefiles.extend([
|
||||||
('android-ndk-r8e-linux-x86.tar.bz2',
|
('android-ndk-r8e-linux-x86.tar.bz2',
|
||||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2')])
|
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2',
|
||||||
|
None)])
|
||||||
wanted = []
|
wanted = []
|
||||||
for f, src in cachefiles:
|
for f, src, shasum in cachefiles:
|
||||||
if not os.path.exists(os.path.join(cachedir, f)):
|
if not os.path.exists(os.path.join(cachedir, f)):
|
||||||
print "Downloading " + f + " to cache"
|
print "Downloading " + f + " to cache"
|
||||||
if subprocess.call(['wget', src], cwd=cachedir) != 0:
|
if subprocess.call(['wget', src], cwd=cachedir) != 0:
|
||||||
print "...download of " + f + " failed."
|
print "...download of " + f + " failed."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
if shasum:
|
||||||
|
p = subprocess.Popen(['shasum', '-a', '256', os.path.join(cachedir, f)],
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
|
v = p.communicate()[0].split(' ')[0]
|
||||||
|
if v != shasum:
|
||||||
|
print "Invalid shasum of '" + v + "' detected for " + f
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
print "...shasum verified for " + f
|
||||||
|
|
||||||
wanted.append(f)
|
wanted.append(f)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user