@eui/tools 6.20.9 → 6.20.10

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.
@@ -1 +1 @@
1
- 6.20.9
1
+ 6.20.10
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.20.10 (2024-08-07)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * force branch checkout for git operations for standalone pkg build - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([05d33d10](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/05d33d10fb8e62319d16782bd4b438bbb1651434))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.20.9 (2024-08-07)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.20.9",
3
+ "version": "6.20.10",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -468,7 +468,8 @@ const commitPackage = (pkg, version, branches) => {
468
468
  return utils.git.commitAndPush(
469
469
  branches.branch,
470
470
  `chore(release): update version: ${version} - from CI server [skip ci]`,
471
- pkg.paths.root
471
+ pkg.paths.root,
472
+ pkg.standalone
472
473
  );
473
474
  })
474
475
  .catch((e) => {
@@ -78,16 +78,24 @@ const hasCommitsSinceLastTag = (folder, version) => {
78
78
  }
79
79
  }
80
80
 
81
- const commitAndPushCore = (branch, message, folder) => {
82
- execa.sync('git', ['add', '.'], { cwd: folder, stdio: 'inherit' });
83
- execa.sync('git', ['commit', '-m', message], { cwd: folder, stdio: 'inherit' });
84
- execa.sync('git', ['checkout', branch], { cwd: folder, stdio: 'inherit' });
85
- execa.sync('git', ['pull', 'origin', branch], { cwd: folder, stdio: 'inherit' });
86
- execa.sync('git', ['push', 'origin', branch], { cwd: folder, stdio: 'inherit' });
81
+ const commitAndPushCore = (branch, message, folder, standalone = false) => {
82
+ if (standalone) {
83
+ execa.sync('git', ['checkout', branch], { cwd: folder, stdio: 'inherit' });
84
+ execa.sync('git', ['add', '.'], { cwd: folder, stdio: 'inherit' });
85
+ execa.sync('git', ['commit', '-m', message], { cwd: folder, stdio: 'inherit' });
86
+ execa.sync('git', ['pull', 'origin', branch], { cwd: folder, stdio: 'inherit' });
87
+ execa.sync('git', ['push', 'origin', branch], { cwd: folder, stdio: 'inherit' });
88
+ } else {
89
+ execa.sync('git', ['add', '.'], { cwd: folder });
90
+ execa.sync('git', ['commit', '-m', message], { cwd: folder });
91
+ execa.sync('git', ['checkout', branch], { cwd: folder });
92
+ execa.sync('git', ['pull', 'origin', branch], { cwd: folder });
93
+ execa.sync('git', ['push', 'origin', branch], { cwd: folder });
94
+ }
87
95
  }
88
96
 
89
97
  // double-run in case of race-condition of 2 pkg built and trying to push as the same time
90
- const commitAndPush = (branch, message, folder) => {
98
+ const commitAndPush = (branch, message, folder, standalone = false) => {
91
99
  tools.logTitle('Commit and pushing files');
92
100
  tools.logInfo(`on branch : ${branch} / folder provided : ${folder}`);
93
101
 
@@ -98,7 +106,7 @@ const commitAndPush = (branch, message, folder) => {
98
106
 
99
107
  try {
100
108
  tools.logInfo('commit and push - first try');
101
- commitAndPushCore(branch, message, folder);
109
+ commitAndPushCore(branch, message, folder, standalone);
102
110
 
103
111
  } catch (e2) {
104
112
  tools.logError('ERROR');