-
-
Notifications
You must be signed in to change notification settings - Fork 13
accepting default app.yaml file #176
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ export default function entrypoint(options = {}) { | |
useCloudTracing = false, | ||
dependencies = {}, | ||
nodejsRuntime = 18, | ||
defaultYamlFile = "app.yaml" | ||
} = options; | ||
|
||
return { | ||
|
@@ -140,9 +141,9 @@ export default function entrypoint(options = {}) { | |
|
||
// Load existing app.yaml if it exists | ||
let yaml = {}; | ||
if (existsSync("app.yaml")) { | ||
builder.log.minor("Existing app.yaml found"); | ||
yaml = YAML.parse(readFileSync("app.yaml").toString()); | ||
if (existsSync(defaultYamlFile)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a yaml file is specified i think the code should throw an error if the file is not found, otherwise it can probably be a bit confusing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although that might be a bit more complicated to get right. I'm fine either way |
||
builder.log.minor(`Existing ${defaultYamlFile} found`); | ||
yaml = YAML.parse(readFileSync(defaultYamlFile).toString()); | ||
} | ||
|
||
const serverRoutes = [ | ||
|
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.
I think it would make more sense to name the parameter something like 'appYamlFile' and not default, since the config overrides the default (which is app.yaml)