forked from mekomsolutions/openmrs-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bahmnicore.js
58 lines (44 loc) · 1.31 KB
/
bahmnicore.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"use strict";
const fs = require("fs");
const path = require("path");
const model = require("../../utils/model");
const utils = require("../../utils/utils");
const cmns = require("../commons");
const thisType = "bahmnicore";
const nexusType = "openmrsmodule";
module.exports = {
getInstance: function() {
var projectBuild = new model.ProjectBuild();
projectBuild.getBuildScript = function() {
var script = cmns.getMavenProjectBuildScript(thisType);
script.body = "mvn clean install -P IT\n";
return script;
};
projectBuild.getDeployScript = function(artifact) {
return cmns.getMavenProjectDeployScript(
thisType,
"ARTIFACT_UPLOAD_URL_" + nexusType
);
};
projectBuild.getArtifact = function(args) {
var artifact = cmns.getMavenProjectArtifact(
args.pom,
"./bahmnicore-omod/target",
"omod"
);
artifact.name = "bahmnicore";
artifact.filename =
artifact.name + "-" + artifact.version + "." + artifact.extension;
artifact.destFilename = artifact.filename;
return artifact;
};
projectBuild.postBuildActions = function(args) {
cmns.mavenPostBuildActions(
args.pom.groupId,
args.artifactsIds,
args.pom.version
);
};
return projectBuild;
}
};