Skip to content

Commit ad09972

Browse files
authored
Merge pull request MicrosoftDocs#201 from MicrosoftDocs/msprod_metadata_30-01-2023
MsProd Warning Fix
2 parents 208bf6e + 4f87e7e commit ad09972

File tree

4 files changed

+23
-27
lines changed

4 files changed

+23
-27
lines changed

azure-pipelines/powershell-docs.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,21 @@ jobs:
5353
pwsh: true
5454
filePath: microsoftgraph-docs-powershell\scripts\FileCopy.ps1
5555

56-
# - task: PowerShell@2
57-
# displayName: 'Update Powershell Help'
58-
# continueOnError: false
59-
# inputs:
60-
# targetType: 'filePath'
61-
# pwsh: true
62-
# filePath: microsoftgraph-docs-powershell\microsoftgraph\UpdateHelp.ps1
56+
- task: PowerShell@2
57+
displayName: 'Update Powershell Help'
58+
continueOnError: false
59+
inputs:
60+
targetType: 'filePath'
61+
pwsh: true
62+
filePath: microsoftgraph-docs-powershell\microsoftgraph\UpdateHelp.ps1
6363

64-
# - task: PowerShell@2
65-
# displayName: 'Escape disallowed html tags'
66-
# continueOnError: false
67-
# inputs:
68-
# targetType: 'filePath'
69-
# pwsh: true
70-
# filePath: microsoftgraph-docs-powershell\microsoftgraph\EscapeDisallowedHtmlTags.ps1
64+
- task: PowerShell@2
65+
displayName: 'Escape disallowed html tags'
66+
continueOnError: false
67+
inputs:
68+
targetType: 'filePath'
69+
pwsh: true
70+
filePath: microsoftgraph-docs-powershell\microsoftgraph\EscapeDisallowedHtmlTags.ps1
7171

7272
- task: PowerShell@2
7373
displayName: 'Update metadata header'
@@ -89,7 +89,7 @@ jobs:
8989
git config --global user.name "Timothy Wamalwa"
9090
cd microsoftgraph-docs-powershell
9191
$date = Get-Date -Format "dd-MM-yyyy"
92-
$proposedBranch = "weekly_update_help_files_msprodvaluesTwo"+$date
92+
$proposedBranch = "weekly_update_help_files_"+$date
9393
git add .
9494
git commit -m "Updating help files "+$date
9595
git push --set-upstream "https://$(GITHUB_TOKEN)@github.com/MicrosoftDocs/microsoftgraph-docs-powershell.git" $proposedBranch

microsoftgraph/EscapeDisallowedHtmlTags.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ function Escape-Angle-Brackets {
2323
Get-FilesByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate
2424
}
2525

26-
Set-Location "../"
2726
git config --global user.email "[email protected]"
2827
git config --global user.name "Timothy Wamalwa"
29-
git add $FilePath
28+
git add .
3029
git commit -m "Escaped disallowed html tags"
3130
}
3231
function Get-FilesByProfile{
@@ -249,7 +248,7 @@ try{
249248
}
250249
return "NA"
251250
}
252-
#Set-Location microsoftgraph-docs-powershell
251+
Set-Location microsoftgraph-docs-powershell
253252
$date = Get-Date -Format "dd-MM-yyyy"
254253
$proposedBranch = "weekly_update_help_files_"+$date
255254
$exists = git branch -l $proposedBranch

microsoftgraph/UpdateHelp.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ function Update-GraphHelp {
4545
$graphProfile = $_
4646
Update-GraphHelpByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate
4747
}
48-
Set-Location "../"
4948
git config --global user.email "[email protected]"
5049
git config --global user.name "Timothy Wamalwa"
51-
git add $FilePath
50+
git add .
5251
git commit -m "Updated markdown help"
5352
}
5453

@@ -101,7 +100,7 @@ $LASTEXITCODE = $null
101100
if ($PSEdition -ne 'Core') {
102101
Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
103102
}
104-
#Set-Location microsoftgraph-docs-powershell
103+
Set-Location microsoftgraph-docs-powershell
105104
$date = Get-Date -Format "dd-MM-yyyy"
106105
$proposedBranch = "weekly_update_help_files_"+$date
107106
$exists = git branch -l $proposedBranch

scripts/MsProdUpdate.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function Start-Generator {
2828
}
2929
Get-FilesByProfile -GraphProfile $GraphProfile -GraphProfilePath $ProfilePath -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate
3030
}
31-
#Set-Location "../"
3231
git config --global user.email "[email protected]"
3332
git config --global user.name "Timothy Wamalwa"
3433
git add .
@@ -47,9 +46,8 @@ function Get-FilesByProfile {
4746
)
4847

4948

50-
#$ModulesToGenerate | ForEach-Object {
51-
#$ModuleName = $_
52-
$ModuleName = "Applications"
49+
$ModulesToGenerate | ForEach-Object {
50+
$ModuleName = $_
5351
$FullModuleName = "$ModulePrefix.$ModuleName"
5452
$ModulePath = Join-Path $WorkLoadDocsPath "\$GraphProfilePath\$FullModuleName"
5553
$OpenApiFile = Join-Path $SDKOpenApiPath "\openApiDocs\v1.0\$ModuleName.yml"
@@ -59,7 +57,7 @@ function Get-FilesByProfile {
5957
$OpenApiContent = ($YamlContent | ConvertFrom-Yaml)
6058
Get-Files -GraphProfile $GraphProfile -GraphProfilePath $ModulePath -Module $ModuleName -OpenApiContent $OpenApiContent -ModulePrefix $ModulePrefix
6159
}
62-
#}
60+
}
6361

6462
}
6563
function Get-Files {
@@ -235,7 +233,7 @@ function WebScrapping {
235233
}
236234
Set-Location microsoftgraph-docs-powershell
237235
$date = Get-Date -Format "dd-MM-yyyy"
238-
$proposedBranch = "weekly_update_help_files_msprodvaluesTwo"+$date
236+
$proposedBranch = "weekly_update_help_files_"+$date
239237
$exists = git branch -l $proposedBranch
240238
if ([string]::IsNullOrEmpty($exists)) {
241239
git checkout -b $proposedBranch

0 commit comments

Comments
 (0)