@@ -85,7 +85,11 @@ Function Export-MonkeyData{
8585 $out = $null ;
8686 [void ][bool ]::TryParse($O365Object.internal_config.htmlSettings.htmlReportFromCDN , [ref ]$out );
8787 $htmlCDNReport = $out ;
88- $assetsRepository = $O365Object.internal_config.htmlSettings.assetsRepository ;
88+ $assetsRepository = $O365Object.internal_config.htmlSettings.assets.repository ;
89+ $branch = $O365Object.internal_config.htmlSettings.assets.branch ;
90+ $out = $null ;
91+ [void ][bool ]::TryParse($O365Object.internal_config.htmlSettings.assets.useLatestTag , [ref ]$out );
92+ $useLatestTag = $out ;
8993 $localAssetsPath = $O365Object.internal_config.htmlSettings.localHtmlReport.assetsPath ;
9094 # Get all rules
9195 $allRules = Get-Rule
@@ -169,18 +173,37 @@ Function Export-MonkeyData{
169173 }
170174 }
171175 If ($htmlCDNReport -and $assetsRepository ){
172- # Set params
173- $p = @ {
174- Repository = $assetsRepository ;
175- Report = $matchedRules ;
176- ExecutionInfo = $O365Object.executionInfo ;
177- Instance = $O365Object.Instance ;
178- Rules = $allRules ;
179- RulesetInfo = $rulesetInfo ;
180- OutDir = $OutHtmlDir ;
181- Verbose = $O365Object.verbose ;
182- Debug = $O365Object.debug ;
183- InformationAction = $O365Object.InformationAction ;
176+ If ($useLatestTag ){
177+ # Set params
178+ $p = @ {
179+ Repository = $assetsRepository ;
180+ LatestTag = $true ;
181+ Report = $matchedRules ;
182+ ExecutionInfo = $O365Object.executionInfo ;
183+ Instance = $O365Object.Instance ;
184+ Rules = $allRules ;
185+ RulesetInfo = $rulesetInfo ;
186+ OutDir = $OutHtmlDir ;
187+ Verbose = $O365Object.verbose ;
188+ Debug = $O365Object.debug ;
189+ InformationAction = $O365Object.InformationAction ;
190+ }
191+ }
192+ Else {
193+ # Set params
194+ $p = @ {
195+ Repository = $assetsRepository ;
196+ Branch = $branch ;
197+ Report = $matchedRules ;
198+ ExecutionInfo = $O365Object.executionInfo ;
199+ Instance = $O365Object.Instance ;
200+ Rules = $allRules ;
201+ RulesetInfo = $rulesetInfo ;
202+ OutDir = $OutHtmlDir ;
203+ Verbose = $O365Object.verbose ;
204+ Debug = $O365Object.debug ;
205+ InformationAction = $O365Object.InformationAction ;
206+ }
184207 }
185208 New-HtmlReport @p
186209 }
0 commit comments