chiark / gitweb /
Use target= in maven builds too
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 10 Jun 2013 20:50:15 +0000 (22:50 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 10 Jun 2013 20:50:15 +0000 (22:50 +0200)
fdroidserver/build.py

index 0814a45c5d0e0767b5e608ed93b6cea600c8b99c..632dd4ee30db41b0e774cf4030cd5a8035392f82 100644 (file)
@@ -367,6 +367,12 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
             mvncmd += ['-Dandroid.sign.debug=true']
         else:
             mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true']
+        if 'target' in thisbuild:
+            target = thisbuild["target"].split('-')[1]
+            subprocess.call(['sed', '-i',
+                    's@<platform>[0-9]*</platform>@<platform>'+target+'</platform>@g',
+                    'pom.xml'], cwd=root_dir)
+
         if 'mvnflags' in thisbuild:
             mvncmd += thisbuild['mvnflags']
         p = subprocess.Popen(mvncmd, cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)