-
Notifications
You must be signed in to change notification settings - Fork 170
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
allow passing multiple environment configuration files #504
Conversation
9483164
to
f558ebe
Compare
f558ebe
to
40dfaaa
Compare
11d3ae7
to
47a7976
Compare
--- | ||
-- @field default_environment Default environment name. | ||
-- @table self | ||
_M.default_environment = 'production' -- default environment name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: redundant comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like bad rebase, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
|
||
local template = Template:new(context, dir, true) | ||
local function apicast_root() | ||
return resty_env.get('APICAST_DIR') or pl.path.abspath('.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be .value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah didn't see that it's fixed in the second commit :)
The `-e` or `--environment` flag can be either and environment name or a path to a file. Plain names are resolved to the config directory in APIcast source.
* .value returns nil when the value is empty string * so it can be chain with `or` for a default value
47a7976
to
20504a8
Compare
-e
or--environment
CLI flag can be repeatedand it can be either an environment name or a path to a file
extracted from #496