forked from eshepelyuk/semantic-release-helm-oci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
31 lines (25 loc) · 787 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import verifyChart from './lib/verifyConditions.js';
import prepareChart from './lib/prepare.js';
import publishChart from './lib/publish.js';
let verified = false;
let prepared = false;
export async function verifyConditions(pluginConfig, context) {
await verifyChart(pluginConfig, context);
verified = true;
}
export async function prepare(pluginConfig, context) {
if (!verified) {
await verifyChart(pluginConfig, context);
}
await prepareChart(pluginConfig, context);
prepared = true;
}
export async function publish(pluginConfig, context) {
if (!verified) {
await verifyChart(pluginConfig, context);
}
if (!prepared) {
await prepareChart(pluginConfig, context);
}
await publishChart(pluginConfig, context);
}