Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom options are used before they are evaluated #3

Closed
henhal opened this issue Jan 2, 2020 · 0 comments
Closed

Custom options are used before they are evaluated #3

henhal opened this issue Jan 2, 2020 · 0 comments

Comments

@henhal
Copy link
Owner

henhal commented Jan 2, 2020

If using references to other variables within the custom.layerConfig object, they are not resolved when the plugin reads them. The hook used to run the plugin is apparently before any references have been resolved to values.

Example:

custom:
  stage: ${opt:stage, self:provider.stage}
  version: ${opt:version, '1-0-0'}
  id: ${self:custom.stage}-${self:custom.version}
  layerConfig:
    installLayers: false
    exportPrefix: ${self:service}-${self:custom.id}-

This will not properly resolve the exportPrefix using the actual value of self:service etc.

Kudos to Robert Etcheverry for reporting this.

@henhal henhal closed this as completed in 621f5cc Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant