Skip to content

Commit

Permalink
Allow lookup template variables from globalTemplateAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
vikage committed Sep 7, 2023
1 parent 213f47d commit 02007ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/ProjectSpec/Template.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ private func resolveTemplates(jsonDictionary: JSONDictionary, templateStructure:
if let templateAttributes = reference["templateAttributes"] as? [String: String] {
reference = reference.expand(variables: templateAttributes)
}

if let globalVariables = jsonDictionary["globalTemplateAttributes"] as? [String: String] {
reference = reference.expand(variables: globalVariables)
}
}
baseDictionary[referenceName] = reference
}
Expand Down

0 comments on commit 02007ae

Please sign in to comment.