Use deterministic permissions to prevent differences in zip files

parent c7a6346c
Pipeline #2985 passed with stages
in 9 minutes and 9 seconds
......@@ -116,6 +116,9 @@ def build_android_arch(versions, env, tool, ndk_arch, pie):
ex(['go', 'build', '-buildmode=%s' % build_mode, '-ldflags', '-w -s' + extldflags] + GO_FLAGS +
[os.path.join('.', versions['build_path'])], env=env, cwd=REPO_DIR)
# use deterministic permissions to prevent differences in zip files
os.chmod('obfs4proxy', 0o755)
pie_suffix = '_pie' if pie else ''
zip_files(['obfs4proxy'], 'obfs4proxy_%s%s.zip' % (ndk_arch, pie_suffix))
os.remove('obfs4proxy')
......@@ -124,6 +127,7 @@ def build_android_arch(versions, env, tool, ndk_arch, pie):
def build_linux(versions):
build_path = os.path.join('.', versions['build_path'])
ex(['go', 'build', '-ldflags', '-w -s'] + GO_FLAGS + [build_path], cwd=REPO_DIR)
os.chmod('obfs4proxy', 0o755) # use deterministic permissions
zip_files(['obfs4proxy'], 'obfs4proxy_linux-x86_64.zip')
os.remove('obfs4proxy')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment