Skip to content

Commit

Permalink
Remove location from scaffolded app (#5600)
Browse files Browse the repository at this point in the history
# Description
Removing location from scaffolded application. `app.bicep` has location
but docs don't show location in the `app.bicep`.

## Issue reference
Fixes: #5601

## Checklist

Please make sure you've completed the relevant tasks for this PR, out of
the following list:

* [ ] Code compiles correctly
* [ ] Adds necessary unit tests for change
* [ ] Adds necessary E2E tests for change
* [ ] Unit tests passing
* [ ] Extended the documentation / Created issue for it

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at ea6ec87</samp>

### Summary
🗑️🛠️📝

<!--
1. 🗑️ - This emoji conveys the idea of removing or deleting something,
which is what the first change did by removing an unnecessary field from
the `rad-config.yaml` template.
2. 🛠️ - This emoji conveys the idea of fixing or repairing something,
which is what the second change did by fixing the comment indentation in
the `rad.yaml` template.
3. 📝 - This emoji conveys the idea of writing or editing something,
which is what both changes did by modifying the code of the templates.
-->
Simplified and improved `rad` CLI setup command by removing unused field
and fixing comment indentation in config templates.

> _`rad-config.yaml`_
> _Simpler and clearer now_
> _Autumn leaves of code_

### Walkthrough
* Remove redundant location field from rad-config.yaml template
([link](https://github.com/project-radius/radius/pull/5600/files?diff=unified&w=0#diff-1b0ac5c011aaaf6673a23365f05fe4d2ebdc793c135984d7b3410e59ef92fa75L33))
* Fix indentation of comment explaining trailing newline in rad.yaml
template
([link](https://github.com/project-radius/radius/pull/5600/files?diff=unified&w=0#diff-1b0ac5c011aaaf6673a23365f05fe4d2ebdc793c135984d7b3410e59ef92fa75L46-R49))

(cherry picked from commit c715d39)
  • Loading branch information
ytimocin authored and lakshmimsft committed May 26, 2023
1 parent 64b2000 commit baa75b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cli/setup/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ param application string
resource demo 'Applications.Core/containers@2022-03-15-privatepreview' = {
name: 'demo'
location: 'global'
properties: {
application: application
container: {
Expand All @@ -40,11 +39,11 @@ resource demo 'Applications.Core/containers@2022-03-15-privatepreview' = {
}
}
}
` // Trailing newline intentional.
` // Trailing newline intentional.

radYamlTemplate = `workspace:
application: %q
` // Trailing newline intentional.
` // Trailing newline intentional.
)

// ScaffoldApplication creates a working sample application in the provided directory
Expand Down

0 comments on commit baa75b9

Please sign in to comment.