summaryrefslogtreecommitdiff
path: root/build/build.py
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-21 08:20:16 +1000
committerJames Mills <prologic@shortcircuit.net.au>2020-03-21 08:20:16 +1000
commitd7a1eab5beba4241dab4402c5cd268432d7b46cd (patch)
tree6383b4ebf511b58597d827dc5af00b71c72caf38 /build/build.py
parent13ffd7117180d1a3093ff291481caeb07a8b71de (diff)
Migrate to Go111Modules, Add Dockerfile and GoRelaser support
Diffstat (limited to 'build/build.py')
-rw-r--r--build/build.py54
1 files changed, 0 insertions, 54 deletions
diff --git a/build/build.py b/build/build.py
deleted file mode 100644
index da19420..0000000
--- a/build/build.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Build Go project for different platforms and create zip archive of project
-# directory structure.
-
-import os
-import zipfile
-
-def build(pkg, bin, env):
- src = 'github.com/wybiral/tube'
- x = os.system('{env} go build -o bin/{bin} {src}'.format(
- env=env,
- bin=bin,
- src=src,
- ))
- if x != 0:
- print('Error building ' + pkg)
- return
- z = zipfile.ZipFile('bin/' + pkg, mode='w')
- z.write('bin/' + bin, arcname=bin)
- z.write('../config.json', arcname='config.json')
- z.write('../README.md', 'README.md')
- z.write('../videos/README.md', 'videos/README.md')
- for filename in os.listdir('../static'):
- z.write('../static/' + filename, 'static/' + filename)
- for filename in os.listdir('../templates'):
- z.write('../templates/' + filename, 'templates/' + filename)
- # cleanup executable
- os.remove('bin/' + bin)
- print('Built ' + pkg)
-
-build(
- pkg='tube_linux.zip',
- bin='tube',
- env='GOOS=linux GOARCH=amd64',
-)
-
-build(
- pkg='tube_windows.zip',
- bin='tube.exe',
- env='GOOS=windows GOARCH=amd64',
-)
-
-build(
- pkg='tube_osx.zip',
- bin='tube',
- env='GOOS=darwin GOARCH=amd64',
-)
-
-build(
- pkg='tube_arm6.zip',
- bin='tube',
- env='GOOS=linux GOARCH=arm GOARM=6',
-)
-
-print('Done.') \ No newline at end of file