saturn-core-cli 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,13 +22,15 @@ try {
22
22
  exemptions = [];
23
23
  }
24
24
 
25
- async function action(release = "patch", options) {
25
+ async function action(options) {
26
26
  try {
27
+ let version_raw = options["version"];
28
+ let message = options["message"];
27
29
  const packageObj = await fs.readJson(`package.json`);
28
30
  //if (version == undefined) {
29
31
  //let version = packageObj.version;
30
32
  //}
31
- let version = semverInc(packageObj.version, release);
33
+ let version = semverInc(packageObj.version, version_raw);
32
34
  packageObj.version = version;
33
35
  await fs.writeJson(`package.json`, packageObj, { spaces: 2 });
34
36
  let map = await new mapper({ exemptions: exemptions }).createMap("./");
@@ -36,7 +38,7 @@ async function action(release = "patch", options) {
36
38
  return;
37
39
  }
38
40
  let core = await getCoreId(packageObj.saturn.core);
39
- await createInstance(map, core.id, version);
41
+ await createInstance(map, core.id, version, message);
40
42
  await doGitAdd();
41
43
  await doGitCommit("SC Publish");
42
44
  await doGitPush();
@@ -186,12 +188,13 @@ async function getCoreId(core) {
186
188
  return mapped_result;
187
189
  }
188
190
 
189
- async function createInstance(map, core, version) {
191
+ async function createInstance(map, core, version, message) {
190
192
  try {
191
193
  var formData = {
192
194
  map: JSON.stringify({ version, map }),
193
195
  core,
194
196
  version,
197
+ description: message,
195
198
  };
196
199
  let response = await axios.post(
197
200
  `${SATURN_URL}/saturn_instances`,
@@ -214,6 +217,12 @@ function command(prog) {
214
217
  program
215
218
  .command("publish [release]", { isDefault: true })
216
219
  .option("-d, --dry <template>", "Dry Run", false)
220
+ .option(
221
+ "-v, --version",
222
+ "Version, options are major, minor, patch",
223
+ "patch"
224
+ )
225
+ .option("-m, --description", "Description of the update", "")
217
226
  .description("Publish Saturn Version")
218
227
  .action(action);
219
228
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saturn-core-cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Saturn Core CLI",
5
5
  "main": "index.js",
6
6
  "scripts": {