def build_web_and_generate_hashes()

in tools/build-release.py [0:0]


def build_web_and_generate_hashes(staging_dir, release_name, arch):
    print("generating reproducible build artifacts for yunikorn-web (%s)" % arch)
    path = os.getcwd()
    tmp_dir = os.path.join(staging_dir, "tmp")
    release_dir = os.path.join(tmp_dir, release_name)
    unpack_staging_tarball(staging_dir, tmp_dir, release_name)
    web_dir = os.path.join(release_dir, "web")
    os.chdir(web_dir)
    retcode = subprocess.call(['make', 'REPRODUCIBLE_BUILDS=1', 'HOST_ARCH=' + arch, 'build_server_prod'])
    if retcode:
        fail("failed to build yunikorn-web (%s)" % arch)
    hash = get_checksum("build/prod/yunikorn-web", "yunikorn-web")
    os.chdir(staging_dir)
    retcode = subprocess.call(['rm', '-rf', 'tmp'])
    if retcode:
        fail("failed to clean temp dir")
    os.chdir(path)
    return hash