mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
makeBinaries added
Former-commit-id: bf42a5371f50bcc7369662ec4a6313222b920050 [formerly 73f53bf45fc21178ffac34e264622b156d4f6663] [formerly 1bad08f49c1e09dfd2566771b3425ce0954f9c18 [formerly 7264847fa2a17fa41e57dab60e08b22884e9bff1 [formerly2c88af9acc
]]] Former-commit-id: 084c71e5f791c21701ddbda804f80d5b7937decd [formerly 8c3b9f15b8eb7b5fce75822a643f79187c7f0d7c] Former-commit-id: 027ab2fc628c9a1d2e480d6695259e24493edf18 Former-commit-id:518efbd77a
This commit is contained in:
parent
a4cd5d11dc
commit
96cc288fa1
59
makeBinaries.py
Executable file
59
makeBinaries.py
Executable file
@ -0,0 +1,59 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
"""DEFUNCT
|
||||||
|
darwin arm
|
||||||
|
darwin arm64
|
||||||
|
dragonfly amd64
|
||||||
|
freebsd 386
|
||||||
|
freebsd amd64
|
||||||
|
freebsd arm
|
||||||
|
linux 386
|
||||||
|
linux arm64
|
||||||
|
linux ppc64le
|
||||||
|
netbsd 386
|
||||||
|
netbsd amd64
|
||||||
|
netbsd arm
|
||||||
|
openbsd 386
|
||||||
|
openbsd amd64
|
||||||
|
openbsd arm
|
||||||
|
plan9 386
|
||||||
|
plan9 amd64
|
||||||
|
solaris amd64
|
||||||
|
windows 386
|
||||||
|
darwin 386
|
||||||
|
darwin amd64
|
||||||
|
linux arm
|
||||||
|
linux ppc64
|
||||||
|
windows amd64"""
|
||||||
|
|
||||||
|
arches = """linux amd64
|
||||||
|
windows amd64
|
||||||
|
linux arm
|
||||||
|
darwin amd64"""
|
||||||
|
|
||||||
|
arches = arches.split("\n")
|
||||||
|
version = "1.0"
|
||||||
|
programName = "awwkoala"
|
||||||
|
try:
|
||||||
|
os.system("rm -rf builds")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
os.mkdir("builds")
|
||||||
|
|
||||||
|
for arch in arches:
|
||||||
|
goos = arch.split()[0]
|
||||||
|
goarch = arch.split()[1]
|
||||||
|
exe = ""
|
||||||
|
if "windows" in goos:
|
||||||
|
exe = ".exe"
|
||||||
|
cmd1 = 'env GOOS=%(goos)s GOARCH=%(goarch)s go build -o builds/%(programName)s%(exe)s' % {'goos':goos,'goarch':goarch,'exe':exe,'programName':programName}
|
||||||
|
cmd2 = 'zip -r %(programName)s-%(version)s-%(goos)s-%(goarch)s.zip %(programName)s%(exe)s ../templates ../static' % {'goos':goos,'goarch':goarch,'exe':exe,'version':version,'programName':programName}
|
||||||
|
print(cmd1)
|
||||||
|
os.system(cmd1)
|
||||||
|
os.chdir("builds")
|
||||||
|
print(cmd2)
|
||||||
|
os.system(cmd2)
|
||||||
|
cmd3 = 'rm %(programName)s%(exe)s' % {'exe':exe,'programName':programName}
|
||||||
|
print(cmd3)
|
||||||
|
os.system(cmd3)
|
||||||
|
os.chdir("../")
|
Loading…
Reference in New Issue
Block a user