-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (19 loc) · 788 Bytes
/
index.js
File metadata and controls
24 lines (19 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { temporaryFile } from 'tempy';
import gemVerify from './src/verifyConditions.js';
import gemPrepare from './src/prepare.js';
import gemPublish from './src/publish.js';
const credentialsFile = temporaryFile({ name: 'gem_credentials' });
let gemName;
let gemspec;
let versionFile;
let gemFile;
async function verifyConditions(pluginConfig, context) {
({ gemName, gemspec, versionFile } = await gemVerify(pluginConfig, context, { credentialsFile }));
}
async function prepare(pluginConfig, context) {
({ gemFile } = await gemPrepare(pluginConfig, context, { versionFile, gemspec, gemName }));
}
async function publish(pluginConfig, context) {
await gemPublish(pluginConfig, context, { gemFile, gemName, credentialsFile });
}
export { verifyConditions, prepare, publish };