@dooer/dooer-test-env 1.2.2 → 1.2.3
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/lib/command/service.js +6 -3
- package/package.json +1 -1
package/lib/command/service.js
CHANGED
|
@@ -74,12 +74,15 @@ module.exports = {
|
|
|
74
74
|
},
|
|
75
75
|
})
|
|
76
76
|
.command({
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
// NB: the positional is `tag`, NOT `version` — a positional named `version` collides with yargs's
|
|
78
|
+
// built-in --version flag (enabled in cli.js), which made argv resolve to the boolean `true`.
|
|
79
|
+
command: 'deploy <name> <tag>',
|
|
80
|
+
describe: 'switch a service to a published registry version/tag (upgrade/downgrade)',
|
|
79
81
|
handler: (a) => {
|
|
82
|
+
if (!a.tag || typeof a.tag !== 'string') throw new Error('missing image tag, e.g. `service deploy <name> 1.2.3`')
|
|
80
83
|
const base = imageFor(a.name, rt.SERVICES_DIR)
|
|
81
84
|
if (!base) throw new Error(`unknown service ${a.name} (no manifest image)`)
|
|
82
|
-
const image = `${base.replace(/:[^:/]+$/, '')}:${a.
|
|
85
|
+
const image = `${base.replace(/:[^:/]+$/, '')}:${a.tag}`
|
|
83
86
|
// merge into the override compose file
|
|
84
87
|
let ov = { services: {} }
|
|
85
88
|
if (fs.existsSync(rt.OVERRIDE_FILE))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dooer/dooer-test-env",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Run the whole Dooer backend locally (staging DB minus customers), copy/purge customers between environments, and shred — one CLI.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": "Dooer/cli-dooer-test-env",
|