Преглед изворни кода

Build with BROKEN=1 by default, fix error creating manifest

Markus Lindenberg пре 8 година
родитељ
комит
0df92c871c
2 измењених фајлова са 7 додато и 4 уклоњено
  1. 1 0
      Dockerfile
  2. 6 4
      docker-build.py

+ 1 - 0
Dockerfile

@@ -5,6 +5,7 @@ ENV GLUON_TAG v2016.1
 ENV DEFAULT_GLUON_RELEASE 0.8.0
 ENV GLUON_TARGETS ar71xx-generic ar71xx-nand mpc85xx-generic x86-generic x86-64
 ENV GLUON_BRANCH stable
+ENV GLUON_BROKEN 1
 
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_PRIORITY critical

+ 6 - 4
docker-build.py

@@ -11,6 +11,8 @@ if isdir('gluon'):
     rmtree('gluon')
 check_call('git clone https://github.com/freifunk-gluon/gluon.git gluon -b "%s"' % environ['GLUON_TAG'], shell=True)
 
+makedirs('output')
+
 # Add site configuration
 makedirs('gluon/site')
 copy('/usr/src/site.mk', 'gluon/site')
@@ -33,12 +35,12 @@ broken = environ['GLUON_BROKEN'] if 'GLUON_BROKEN' in environ else '0'
 # Build
 for target in targets:
     print('Building for target %s' % target)
-    check_call('make -j %s GLUON_BRANCH=%s BROKEN=%s GLUON_TARGET=%s' % (cpu_count(), branch, broken, target), shell=True)
+    check_call('make -j %s GLUON_BRANCH=%s BROKEN=%s GLUON_TARGET=%s' % (cpu_count()+1, branch, broken, target), shell=True)
+    check_call('make manifest GLUON_BRANCH=%s' % branch, shell=True)
+    copytree('output', '../output/%s' % target)
     check_call('make dirclean', shell=True)
 
-check_call('make manifest GLUON_BRANCH=%s' % branch, shell=True)
-
 print('''BUILD FINISHED
 You can copy the resulting images from the container using:
-docker cp %s:/usr/src/build/gluon/output <destination>'''% environ.get('HOSTNAME'))
+docker cp %s:/usr/src/build/output <destination>'''% environ.get('HOSTNAME'))