blob: 67c134b13e0607a50cb53333735a7c51e7227b49 (
plain)
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
|
#!/usr/bin/env node
import { DefaultGitHookPipelineBuilder, NpmPublishJob } from '@emprespresso/ci_model';
const getPipeline = () => {
const gitHookPipeline = new DefaultGitHookPipelineBuilder();
const branch = gitHookPipeline.getBranch();
if (!branch || branch !== 'release') return gitHookPipeline.build();
const publish: NpmPublishJob = {
type: 'npm_publish.js',
arguments: {
source: 'pengueno',
registry: 'registry.npmjs.org',
},
};
gitHookPipeline.addStage({ parallelJobs: [publish] });
return gitHookPipeline.build();
};
const main = () => {
const data = getPipeline().serialize();
process.stdout.write(data);
};
main();
|