mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 00:01:19 +00:00
Update syncthing build script (#10)
This commit is contained in:
parent
8c2efcb72a
commit
22789dd224
1 changed files with 10 additions and 2 deletions
|
@ -105,8 +105,6 @@ for target in BUILD_TARGETS:
|
||||||
'-v'
|
'-v'
|
||||||
])
|
])
|
||||||
|
|
||||||
print('Building syncthing')
|
|
||||||
|
|
||||||
environ = os.environ.copy()
|
environ = os.environ.copy()
|
||||||
environ.update({
|
environ.update({
|
||||||
'GOPATH': module_dir,
|
'GOPATH': module_dir,
|
||||||
|
@ -114,8 +112,18 @@ for target in BUILD_TARGETS:
|
||||||
'CC': os.path.join(standalone_ndk_dir, 'bin', target['cc'])
|
'CC': os.path.join(standalone_ndk_dir, 'bin', target['cc'])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
syncthingVersion = subprocess.check_output([
|
||||||
|
'git',
|
||||||
|
'-C',
|
||||||
|
syncthing_dir,
|
||||||
|
'describe',
|
||||||
|
'--always'
|
||||||
|
]).strip();
|
||||||
|
syncthingVersion = syncthingVersion.replace("rc", "preview");
|
||||||
|
print('Building syncthing version', syncthingVersion);
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'go', 'run', 'build.go', '-goos', 'android', '-goarch', target['goarch'],
|
'go', 'run', 'build.go', '-goos', 'android', '-goarch', target['goarch'],
|
||||||
|
'-version', syncthingVersion
|
||||||
] + pkg_argument + ['-no-upgrade', 'build'], env=environ, cwd=syncthing_dir)
|
] + pkg_argument + ['-no-upgrade', 'build'], env=environ, cwd=syncthing_dir)
|
||||||
|
|
||||||
# Copy compiled binary to jniLibs folder
|
# Copy compiled binary to jniLibs folder
|
||||||
|
|
Loading…
Reference in a new issue