mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Feedback from eahefnawy
Using project.toObjectPopulated
This commit is contained in:
parent
29484ab876
commit
dad31cebb1
@ -255,10 +255,10 @@ usage: serverless resources deploy`,
|
||||
|
||||
const project = S.getProject(),
|
||||
projectName = project.getName(),
|
||||
stage = this.evt.options.stage,
|
||||
region = this.evt.options.region,
|
||||
aws = S.getProvider('aws'),
|
||||
stackName = project.getRegion(stage, region).getVariables().resourcesStackName || aws.getResourcesStackName(stage, projectName);
|
||||
stage = this.evt.options.stage,
|
||||
region = this.evt.options.region,
|
||||
aws = S.getProvider('aws'),
|
||||
stackName = project.getRegion(stage, region).getVariables().resourcesStackName || aws.getResourcesStackName(stage, projectName);
|
||||
|
||||
// CF Params
|
||||
let params = {
|
||||
@ -277,18 +277,15 @@ usage: serverless resources deploy`,
|
||||
Value: stage
|
||||
}];
|
||||
|
||||
let templates = project.getTemplates().toObject();
|
||||
let projectData = SUtils.readFileSync(project.getFilePath());
|
||||
|
||||
//Populate the s-project data with the variables
|
||||
let projectFilePopulated = SUtils.populate(project, templates, projectData, stage, region);
|
||||
let projectFilePopulated = project.toObjectPopulated({stage: stage, region: region});
|
||||
|
||||
_.forEach(projectFilePopulated.resourcesStackTags, function(value, key) {
|
||||
STags.push({
|
||||
Key: key,
|
||||
Value: value
|
||||
})
|
||||
});
|
||||
STags.push({
|
||||
Key: key,
|
||||
Value: value
|
||||
})
|
||||
});
|
||||
|
||||
params.Tags = STags;
|
||||
params.StackName = stackName;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user