blob: 668ee95ec90bc1fb6819729c8770738db7172324 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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.25.2"
}
async function gatherBuildInfo() {
|