This pull request refactors the implementation of production/staging hosts (see: #533). It includes minor feature changes and is backwards compatible with any previously valid configurations.
This pull request comes "on top" of (i.e. includes changes from) #652 (which in turn comes "on top" of #651, which is "on top" of #648, #649, #650). Work is in preparation for resolving issue #654.
Change
Features
Added development_host option. Becomes default option for publishunpublish when present.
Changed behavior when alternate hosts are defined. Now production_host acts as alias to host. Defining staging_host or development_host is enough to default publish and unpublish away from production.
An invalid s3_host option does not result in error and is instead silently ignored.
Bug Fix #653
When a chain of commands that includes publish or unpublish and host is not specifically set via command line or environment variable, all commands in the chain default away from production.
Code
Moved logic regarding host selection of host to versioning. This is where all user defined values from package.json are transformed into command options.
Tests
Tests of feature where moved from run.test.js to versioning.test.js.
Increased test coverage for various options of using the hosts.
Overview
This pull request refactors the implementation of production/staging hosts (see: #533). It includes minor feature changes and is backwards compatible with any previously valid configurations.
This pull request comes "on top" of (i.e. includes changes from) #652 (which in turn comes "on top" of #651, which is "on top" of #648, #649, #650). Work is in preparation for resolving issue #654.
Change
Features
development_host
option. Becomes default option forpublish
unpublish
when present.production_host
acts as alias tohost
. Definingstaging_host
ordevelopment_host
is enough to defaultpublish
andunpublish
away from production.s3_host
option does not result in error and is instead silently ignored.Bug Fix #653
publish
orunpublish
and host is not specifically set via command line or environment variable, all commands in the chain default away from production.Code
Tests
run.test.js
toversioning.test.js
.