forked from nflaig/semantic-release-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (26 loc) · 828 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
32
33
const verifyChart = require('./lib/verifyConditions');
const prepareChart = require('./lib/prepare');
const publishChart = require('./lib/publish');
let verified = false;
let prepared = false;
async function verifyConditions(pluginConfig, context) {
await verifyChart(pluginConfig, context);
verified = true;
}
async function prepare(pluginConfig, context) {
if (!verified) {
await verifyChart(pluginConfig, context);
}
await prepareChart(pluginConfig, context);
prepared = true;
}
async function publish(pluginConfig, context) {
if (!verified) {
await verifyChart(pluginConfig, context);
}
if (!prepared) {
await prepareChart(pluginConfig, context);
}
await publishChart(pluginConfig, context);
}
module.exports = {verifyConditions, prepare, publish};