From 22789dd224c696e45e1a5f080d0cb90f347f3645 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Mon, 20 Aug 2018 01:15:06 +0200 Subject: [PATCH] Update syncthing build script (#10) --- syncthing/build-syncthing.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/syncthing/build-syncthing.py b/syncthing/build-syncthing.py index aecb8250..f2a0501d 100644 --- a/syncthing/build-syncthing.py +++ b/syncthing/build-syncthing.py @@ -105,8 +105,6 @@ for target in BUILD_TARGETS: '-v' ]) - print('Building syncthing') - environ = os.environ.copy() environ.update({ 'GOPATH': module_dir, @@ -114,8 +112,18 @@ for target in BUILD_TARGETS: '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([ 'go', 'run', 'build.go', '-goos', 'android', '-goarch', target['goarch'], + '-version', syncthingVersion ] + pkg_argument + ['-no-upgrade', 'build'], env=environ, cwd=syncthing_dir) # Copy compiled binary to jniLibs folder