1
0
Fork 0
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:
Catfriend1 2018-08-20 01:15:06 +02:00 committed by GitHub
parent 8c2efcb72a
commit 22789dd224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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