semantic-release-pub 0.3.1 → 0.3.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.
- package/dist/verifyConditions.d.ts +2 -1
- package/dist/verifyConditions.js +10 -5
- package/package.json +12 -12
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { VerifyConditionsContext } from 'semantic-release';
|
|
1
2
|
import { PluginConfig } from './types.js';
|
|
2
|
-
export declare const verifyConditions: (pluginConfig: PluginConfig) => Promise<void>;
|
|
3
|
+
export declare const verifyConditions: (pluginConfig: PluginConfig, { logger }: VerifyConditionsContext) => Promise<void>;
|
package/dist/verifyConditions.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import SemanticReleaseError from '@semantic-release/error';
|
|
2
2
|
import { execa } from 'execa';
|
|
3
3
|
import { getConfig, getGoogleIdentityToken } from './utils.js';
|
|
4
|
-
export const verifyConditions = async (pluginConfig) => {
|
|
5
|
-
const { cli } = getConfig(pluginConfig);
|
|
4
|
+
export const verifyConditions = async (pluginConfig, { logger }) => {
|
|
5
|
+
const { cli, publishPub } = getConfig(pluginConfig);
|
|
6
6
|
const { GOOGLE_SERVICE_ACCOUNT_KEY } = process.env;
|
|
7
|
-
if (
|
|
8
|
-
|
|
7
|
+
if (publishPub) {
|
|
8
|
+
if (!GOOGLE_SERVICE_ACCOUNT_KEY) {
|
|
9
|
+
throw new SemanticReleaseError('Environment variable not found: GOOGLE_SERVICE_ACCOUNT_KEY');
|
|
10
|
+
}
|
|
11
|
+
await getGoogleIdentityToken(GOOGLE_SERVICE_ACCOUNT_KEY);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
logger.log(`Skipping Google service account key verification as publishPub is ${publishPub}`);
|
|
9
15
|
}
|
|
10
16
|
await verifyCommand(cli);
|
|
11
|
-
await getGoogleIdentityToken(GOOGLE_SERVICE_ACCOUNT_KEY);
|
|
12
17
|
};
|
|
13
18
|
const verifyCommand = async (command) => {
|
|
14
19
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-pub",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "semantic-release plugin to publish a Dart or Flutter package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "zeshuaro@gmail.com",
|
|
@@ -42,24 +42,24 @@
|
|
|
42
42
|
"@semantic-release/changelog": "6.0.3",
|
|
43
43
|
"@semantic-release/git": "10.0.1",
|
|
44
44
|
"@types/common-tags": "1.8.2",
|
|
45
|
-
"@types/semantic-release": "20.0.
|
|
46
|
-
"@types/semantic-release__error": "3.0.
|
|
47
|
-
"@types/signale": "1.4.
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "6.7.
|
|
49
|
-
"@typescript-eslint/parser": "6.7.
|
|
50
|
-
"@vitest/coverage-v8": "0.34.
|
|
45
|
+
"@types/semantic-release": "20.0.2",
|
|
46
|
+
"@types/semantic-release__error": "3.0.1",
|
|
47
|
+
"@types/signale": "1.4.5",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "6.7.5",
|
|
49
|
+
"@typescript-eslint/parser": "6.7.5",
|
|
50
|
+
"@vitest/coverage-v8": "0.34.6",
|
|
51
51
|
"common-tags": "1.8.2",
|
|
52
52
|
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
53
|
-
"eslint": "8.
|
|
53
|
+
"eslint": "8.51.0",
|
|
54
54
|
"eslint-config-semistandard": "17.0.0",
|
|
55
55
|
"eslint-config-standard": "17.1.0",
|
|
56
56
|
"eslint-plugin-import": "2.28.1",
|
|
57
|
-
"eslint-plugin-n": "
|
|
57
|
+
"eslint-plugin-n": "16.2.0",
|
|
58
58
|
"eslint-plugin-promise": "6.1.1",
|
|
59
59
|
"prettier": "3.0.3",
|
|
60
|
-
"semantic-release": "
|
|
60
|
+
"semantic-release": "22.0.5",
|
|
61
61
|
"typescript": "5.2.2",
|
|
62
|
-
"vitest": "0.34.
|
|
63
|
-
"vitest-mock-extended": "1.
|
|
62
|
+
"vitest": "0.34.6",
|
|
63
|
+
"vitest-mock-extended": "1.3.1"
|
|
64
64
|
}
|
|
65
65
|
}
|