@verdnatura/myt 2.0.3 → 2.0.5

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.
package/README.md CHANGED
@@ -67,7 +67,7 @@ running the command along with the _--help_ parameter, only the most commonly
67
67
  used ones are documented here.
68
68
 
69
69
  ```text
70
- $ myt <command> [<args>] [-h|--help]
70
+ $ myt <command> [-h|--help]
71
71
  ```
72
72
 
73
73
  ### Usage as library
@@ -282,7 +282,7 @@ $ myt create [<args>] [-t <type>] <schema>.<name>
282
282
  Cleans all already applied versions older than *maxOldVersions*.
283
283
 
284
284
  ```text
285
- $ myt clean [-p|--purge]
285
+ $ myt clean [<args>] [-p|--purge]
286
286
  ```
287
287
 
288
288
  ## Local server commands
package/lib/docker.js CHANGED
@@ -61,6 +61,10 @@ const docker = {
61
61
  return JSON.parse(child.stdout || null);
62
62
  },
63
63
 
64
+ async tag(source, target) {
65
+ await docker.command('tag', [source, target]);
66
+ },
67
+
64
68
  async command(command, args, options, execMode, execOptions, debug) {
65
69
  const execArgs = [command];
66
70
 
package/myt-build.js CHANGED
@@ -270,7 +270,8 @@ class Build extends Command {
270
270
  } finally {
271
271
  await fs.unlink(changesFile);
272
272
  }
273
- }
273
+ } else if (opts.tag)
274
+ await docker.tag(tag, `${imageName}:${opts.tag}`);
274
275
 
275
276
  this.emit('serverImageTag', tag);
276
277
  return tag;
package/myt-run.js CHANGED
@@ -75,9 +75,7 @@ class Run extends Command {
75
75
  realm: opts.realm
76
76
  });
77
77
  } else {
78
- if (!opts.name)
79
- throw new Error('Build ommitted but no image passed');
80
- tag = opts.name;
78
+ tag = opts.name || cfg.code;
81
79
  if (opts.tag) tag += `:${opts.tag}`;
82
80
  }
83
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdnatura/myt",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "author": "Verdnatura Levante SL",
5
5
  "description": "MySQL version control",
6
6
  "license": "GPL-3.0",