@naturalcycles/nodejs-lib 12.97.0 → 12.98.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,11 +42,11 @@ function json2env(opt) {
42
42
  }
43
43
  }
44
44
  if (bashEnv) {
45
- appendToBashEnv(json);
45
+ appendToBashEnv(json, prefix);
46
46
  }
47
47
  if (githubEnv) {
48
- appendToGithubEnv(json);
49
- appendToGithubOutput(json);
48
+ appendToGithubEnv(json, prefix);
49
+ appendToGithubOutput(json, prefix);
50
50
  }
51
51
  }
52
52
  exports.json2env = json2env;
@@ -19,7 +19,7 @@ function generateBuildInfo() {
19
19
  try {
20
20
  if ((0, fs_util_1._pathExistsSync)('package.json')) {
21
21
  const packageJson = (0, fs_util_1._readJsonSync)('package.json');
22
- env = packageJson?.['envByBranch']?.[branchName];
22
+ env = packageJson?.['envByBranch']?.[branchName] || packageJson?.['envByBranch']?.['*'];
23
23
  }
24
24
  }
25
25
  catch { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
- "version": "12.97.0",
3
+ "version": "12.98.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "docs-serve": "vuepress dev docs",
@@ -80,6 +80,7 @@
80
80
  "author": "Natural Cycles Team",
81
81
  "license": "MIT",
82
82
  "envByBranch": {
83
- "master": "master"
83
+ "master": "master",
84
+ "*": "branch"
84
85
  }
85
86
  }
@@ -81,12 +81,12 @@ export function json2env(opt: Json2EnvOptions): void {
81
81
  }
82
82
 
83
83
  if (bashEnv) {
84
- appendToBashEnv(json)
84
+ appendToBashEnv(json, prefix)
85
85
  }
86
86
 
87
87
  if (githubEnv) {
88
- appendToGithubEnv(json)
89
- appendToGithubOutput(json)
88
+ appendToGithubEnv(json, prefix)
89
+ appendToGithubOutput(json, prefix)
90
90
  }
91
91
  }
92
92
 
@@ -26,7 +26,7 @@ export function generateBuildInfo(): BuildInfo {
26
26
  try {
27
27
  if (_pathExistsSync('package.json')) {
28
28
  const packageJson = _readJsonSync<AnyObject>('package.json')
29
- env = packageJson?.['envByBranch']?.[branchName]
29
+ env = packageJson?.['envByBranch']?.[branchName] || packageJson?.['envByBranch']?.['*']
30
30
  }
31
31
  } catch {}
32
32
  }