An ember-cli-deploy plugin that allows activating the latest existing revision
When running the
This avoids needing to find and provided the revision key in a seperate step when you know you want to activate the most recent deploy.
This way, the proper revision key is passed to the
Note: This addon is early in development and is pre-1.0 release. It has not been heavily tested in production and there may be breaking changes in the future pre-1.0 versions.
Compatibility
- Ember-CLI-Deploy >= 1.0.0
Installation
yarn add --dev ember-cli-deploy-latest
Usage
ember deploy:acticvate <environment> --revision latest
When running the
activate
command, this addon allows passing the keyword "latest"
as the revision key to indicate that the most recent deploy should be activated.This avoids needing to find and provided the revision key in a seperate step when you know you want to activate the most recent deploy.
How it works
During ember-cli-deploy'swillActivate
hook the list of revisions is first sorted
by date. The most recent deploy's revision key is then used to substitute the
"latest" keyword passed into the inital command.This way, the proper revision key is passed to the
activate
hook
which should be implemented by another ember-cli-deploy, like ember-cli-deploy-s3-index,
for activating that revision.Testing
yarn test
Linting
yarn lint