@elliemae/pui-cli 8.55.3 → 8.55.6
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,13 +1,30 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Semantic Release plugin to write publish info and set dist tag
|
|
6
|
+
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
|
+
*/
|
|
3
8
|
module.exports = {
|
|
4
|
-
success: async (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
success: async (pluginConfig, context) => {
|
|
10
|
+
const { nextRelease, logger } = context;
|
|
11
|
+
|
|
12
|
+
if (!nextRelease) {
|
|
13
|
+
logger?.log?.('No release information available');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (!nextRelease.channel) {
|
|
18
|
+
nextRelease.channel = 'latest';
|
|
19
|
+
}
|
|
20
|
+
const fname = path.join(process.cwd(), 'publish-info.json');
|
|
21
|
+
|
|
22
|
+
try {
|
|
9
23
|
fs.writeFileSync(fname, JSON.stringify(nextRelease, null, 2));
|
|
24
|
+
logger?.log?.(`Wrote publish info to ${fname}`);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
logger?.error?.(`Failed to write publish info: ${error.message}`);
|
|
27
|
+
throw error;
|
|
10
28
|
}
|
|
11
|
-
process.env.DIST_TAG = distTag;
|
|
12
29
|
},
|
|
13
30
|
};
|
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Semantic Release plugin to write publish info and set dist tag
|
|
6
|
+
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
|
+
*/
|
|
3
8
|
module.exports = {
|
|
4
|
-
success: async (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
success: async (pluginConfig, context) => {
|
|
10
|
+
const { nextRelease, logger } = context;
|
|
11
|
+
|
|
12
|
+
if (!nextRelease) {
|
|
13
|
+
logger?.log?.('No release information available');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (!nextRelease.channel) {
|
|
18
|
+
nextRelease.channel = 'latest';
|
|
19
|
+
}
|
|
20
|
+
const fname = path.join(process.cwd(), 'publish-info.json');
|
|
21
|
+
|
|
22
|
+
try {
|
|
9
23
|
fs.writeFileSync(fname, JSON.stringify(nextRelease, null, 2));
|
|
24
|
+
logger?.log?.(`Wrote publish info to ${fname}`);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
logger?.error?.(`Failed to write publish info: ${error.message}`);
|
|
27
|
+
throw error;
|
|
10
28
|
}
|
|
11
|
-
process.env.DIST_TAG = distTag;
|
|
12
29
|
},
|
|
13
30
|
};
|