diff --unified --recursive --text orig/bin/build-shared-version-info.js patched/bin/build-shared-version-info.js --- orig/bin/build-shared-version-info.js 2021-09-08 23:50:25.000000000 +0200 +++ patched/bin/build-shared-version-info.js 2021-09-11 14:19:06.671126380 +0200 @@ -3,40 +3,8 @@ const { readFile } = require('fs/promises') const { join } = require('path') -function gatherProcessStdout(cmd, args) { - const { status, stdout, stderr } = spawnSync(cmd, args) - if (status !== 0) throw new Error(stderr) - return stdout.toString().replace(/\n/g, '') -} - async function getGitRef() { - if (process.env.VERSION_INFO_GIT_REF) { - return process.env.VERSION_INFO_GIT_REF - } - - let git_describe, git_branch - try { - git_describe = gatherProcessStdout('git', ['describe']) - try { - git_symbolic_ref = - process.env.GITHUB_HEAD_REF || - process.env.GITHUB_REF || - gatherProcessStdout('git', ['symbolic-ref', 'HEAD']) - git_branch = git_symbolic_ref.split('/').pop() - console.log(git_symbolic_ref, git_branch) - } catch (err) { - console.log(err) - git_branch = 'master' - } - } catch (err) { - console.log(err) - console.log('Hint: you can set the env var VERSION_INFO_GIT_REF manualy') - process.exit(1) - } - - const git_ref = - git_describe + (git_branch === 'master' ? '' : '-' + git_branch) - return git_ref + return "tags/v1.30.1" } async function gatherBuildInfo() {