Browse code

Added --no-run switch for automated builds

This saves having to run sed to edit the build script, and stops
piano.rom (and piano.log) from being bundled with the binary outputs.

Andrew Alderwick authored on 14/10/2021 22:38:29
Showing 2 changed files
... ...
@@ -22,16 +22,15 @@ tasks:
22 22
         printf 'User build\nStrictHostKeyChecking yes\nCheckHostIP no\nHost win\nHostName w1.uxn-build.ald.nu\nPort 2222\nHost mac\nHostName m1.uxn-build.ald.nu\nPort 2223\n' > ~/.ssh/config
23 23
     - build-linux: |
24 24
         cd uxn
25
-        sed -i -e 's/.*Running.*/exit/' build.sh
26
-        ./build.sh
25
+        ./build.sh --no-run
27 26
         mv bin uxn
28 27
         tar -czf ../out/uxn-linux-amd64.tar.gz uxn
29 28
         cd ..
30 29
     - build-windows: |
31
-        ssh win "rm -f uxn-windows-64bit.zip; export PATH=\"\${PATH}:/mingw64/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); sed -i -e 's/.*Running.*/exit/' build.sh; MSYSTEM=MSYS ./build.sh; mv bin uxn; zip -qr ../uxn-windows-64bit.zip uxn"
30
+        ssh win "rm -f uxn-windows-64bit.zip; export PATH=\"\${PATH}:/mingw64/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); MSYSTEM=MSYS ./build.sh --no-run; mv bin uxn; zip -qr ../uxn-windows-64bit.zip uxn"
32 31
         rsync win:uxn-windows-64bit.zip out/
33 32
     - build-macos: |
34
-        ssh mac "rm -f uxn-macos.tar.gz; export PATH=\"\${PATH}:/usr/local/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); sed -i -e 's/.*Running.*/exit/' build.sh; ./build.sh; mv bin uxn; tar -zcf ../uxn-macos.tar.gz uxn"
33
+        ssh mac "rm -f uxn-macos.tar.gz; export PATH=\"\${PATH}:/usr/local/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); ./build.sh --no-run; mv bin uxn; tar -zcf ../uxn-macos.tar.gz uxn"
35 34
         rsync mac:uxn-macos.tar.gz out/
36 35
     - upload: |
37 36
         ls -l out
... ...
@@ -64,6 +64,8 @@ fi
64 64
 echo "Assembling(asma).."
65 65
 ./bin/uxnasm projects/software/asma.tal bin/asma.rom
66 66
 
67
+if [ "${1}" = '--no-run' ]; then exit; fi
68
+
67 69
 echo "Assembling(piano).."
68 70
 bin/uxncli bin/asma.rom projects/examples/demos/piano.tal bin/piano.rom 2> bin/piano.log
69 71