@naturalcycles/backend-lib 5.17.2 → 5.17.3
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.
|
@@ -49,7 +49,7 @@ async function createDeployInfo(backendCfg, overrideBranch) {
|
|
|
49
49
|
// Obfuscates the branch name by hashing it.
|
|
50
50
|
// If there are Jira issue names in the branch name, the first one found will be used as a prefix.
|
|
51
51
|
const jiraIssue = gitBranch.match(/([Dd][Ee][Vv]-\d+)/)?.[0];
|
|
52
|
-
const branchHash = (0, nodejs_lib_1.
|
|
52
|
+
const branchHash = (0, nodejs_lib_1.sha256)(gitBranch).slice(0, 10);
|
|
53
53
|
branchName = [jiraIssue, branchHash].filter(Boolean).join('-');
|
|
54
54
|
}
|
|
55
55
|
gaeService = validateGAEServiceName([branchName, gaeService].join('--'));
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _assert, _mapValues, _merge, _truncate, localTime } from '@naturalcycles/js-lib'
|
|
2
|
-
import { dimGrey, fs2,
|
|
2
|
+
import { dimGrey, fs2, sha256, white } from '@naturalcycles/nodejs-lib'
|
|
3
3
|
import { BackendCfg } from './backend.cfg.util'
|
|
4
4
|
import { AppYaml, DeployInfo } from './deploy.model'
|
|
5
5
|
|
|
@@ -63,7 +63,7 @@ export async function createDeployInfo(
|
|
|
63
63
|
// Obfuscates the branch name by hashing it.
|
|
64
64
|
// If there are Jira issue names in the branch name, the first one found will be used as a prefix.
|
|
65
65
|
const jiraIssue = gitBranch.match(/([Dd][Ee][Vv]-\d+)/)?.[0]
|
|
66
|
-
const branchHash =
|
|
66
|
+
const branchHash = sha256(gitBranch).slice(0, 10)
|
|
67
67
|
branchName = [jiraIssue, branchHash].filter(Boolean).join('-')
|
|
68
68
|
}
|
|
69
69
|
|