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

Support for variable expansion in the "name" field #881

Merged
merged 1 commit into from
May 19, 2020
Merged

Support for variable expansion in the "name" field #881

merged 1 commit into from
May 19, 2020

Conversation

pchico83
Copy link
Contributor

Fixes #880

Signed-off-by: Pablo Chico de Guzman <pchico83@gmail.com>
@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #881 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #881      +/-   ##
==========================================
+ Coverage   33.33%   33.41%   +0.07%     
==========================================
  Files          67       67              
  Lines        5285     5291       +6     
==========================================
+ Hits         1762     1768       +6     
  Misses       3375     3375              
  Partials      148      148              
Impacted Files Coverage Δ
pkg/model/dev.go 65.18% <100.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ca66b5...2b6f7f1. Read the comment docs.

@@ -273,6 +277,12 @@ func Read(bytes []byte) (*Dev, error) {
return dev, nil
}

func (dev *Dev) loadName() {
if len(dev.Name) > 0 {
dev.Name = os.ExpandEnv(dev.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this support env vars with a default value ? ${foo-NAME} kind of thing.

@pchico83
Copy link
Contributor Author

@rberrelleza let's track that as part of #874

@pchico83 pchico83 merged commit 5c8aef1 into master May 19, 2020
@pchico83 pchico83 deleted the name branch May 19, 2020 07:29
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

Successfully merging this pull request may close these issues.

Support for generateName
2 participants