Skip to content

Commit ab6d3ce

Browse files
committed
made changes
1 parent 4a9e097 commit ab6d3ce

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

azure-pipelines/powershell-docs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ jobs:
6969
# pwsh: true
7070
# filePath: microsoftgraph-docs-powershell\microsoftgraph\EscapeDisallowedHtmlTags.ps1
7171

72-
# - task: PowerShell@2
73-
# displayName: 'Update metadata header'
74-
# continueOnError: false
75-
# inputs:
76-
# targetType: 'filePath'
77-
# pwsh: true
78-
# filePath: microsoftgraph-docs-powershell\scripts\MsProdUpdate.ps1
72+
- task: PowerShell@2
73+
displayName: 'Update metadata header'
74+
continueOnError: false
75+
inputs:
76+
targetType: 'filePath'
77+
pwsh: true
78+
filePath: microsoftgraph-docs-powershell\scripts\MsProdUpdate.ps1
7979

8080
- task: PowerShell@2
8181
displayName: 'Update Links'
@@ -97,7 +97,7 @@ jobs:
9797
git config --global user.name "Timothy Wamalwa"
9898
cd microsoftgraph-docs-powershell
9999
$date = Get-Date -Format "dd-MM-yyyy"
100-
$proposedBranch = "weekly_v2_docs_update_"+$date
100+
$proposedBranch = "weekly_v2_docs_update_29-06-2023"
101101
git add .
102102
git commit -m "Updating help files "+$date
103103
git push --set-upstream "https://$(GITHUB_TOKEN)@github.com/MicrosoftDocs/microsoftgraph-docs-powershell.git" $proposedBranch

scripts/GenerateServiceModules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Param(
2-
[string] $ModuleMappingConfigPath =(Join-Path $PSScriptRoot "..\config\ModulesMapping.jsonc")
2+
[string] $ModuleMappingConfigPath =(Join-Path $PSScriptRoot "../../msgraph-sdk-powershell/")
33
)
44
if (-not (Test-Path $ModuleMappingConfigPath)) {
55
Write-Error "Module mapping file not be found: $ModuleMappingConfigPath."

scripts/MsProdUpdate.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
Param(
44
$ModulesToGenerate = @(),
55
[string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"),
6-
[string] $SDKDocsPath = ("..\msgraph-sdk-powershell\src"),
7-
[string] $SDKOpenApiPath = ("..\msgraph-sdk-powershell"),
8-
[string] $WorkLoadDocsPath = ("..\microsoftgraph-docs-powershell\microsoftgraph"),
9-
[string] $GraphDocsPath = ("..\microsoft-graph-docs"),
10-
[string] $MissingMsProdHeaderPath = ("..\microsoftgraph-docs-powershell\missingexternaldocsurl"),
6+
[string] $SDKDocsPath = (Join-Path $PSScriptRoot "../../msgraph-sdk-powershell/src"),
7+
[string] $SDKOpenApiPath = (Join-Path $PSScriptRoot "../../msgraph-sdk-powershell"),
8+
[string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"),
9+
[string] $GraphDocsPath = (Join-Path $PSScriptRoot "../../microsoft-graph-docs"),
10+
[string] $MissingMsProdHeaderPath = (Join-Path $PSScriptRoot "../missingexternaldocsurl"),
1111
[hashtable]$V1CommandGetVariantList= @{},
1212
[hashtable]$BetaCommandGetVariantList= @{},
1313
[hashtable]$V1CommandListVariantList= @{},
@@ -56,8 +56,8 @@ function Get-FilesByProfile {
5656
$ModulesToGenerate | ForEach-Object {
5757
$ModuleName = $_
5858
$FullModuleName = "$ModulePrefix.$ModuleName"
59-
$ModulePath = Join-Path $WorkLoadDocsPath "\$GraphProfilePath\$FullModuleName"
60-
$OpenApiFile = Join-Path $SDKOpenApiPath "\openApiDocs\v1.0\$ModuleName.yml"
59+
$ModulePath = Join-Path $WorkLoadDocsPath $GraphProfilePath $FullModuleName
60+
$OpenApiFile = Join-Path $SDKOpenApiPath "openApiDocs" $GraphProfile "$ModuleName.yml"
6161
#test this path first before proceeding
6262
if (Test-Path $OpenApiFile) {
6363
$YamlContent = Get-Content -Path $OpenApiFile
@@ -72,14 +72,14 @@ function Get-Files {
7272
[ValidateSet("beta", "v1.0")]
7373
[string] $GraphProfile = "v1.0",
7474
[ValidateNotNullOrEmpty()]
75-
[string] $GraphProfilePath = "..\microsoftgraph-docs-powershell\microsoftgraph\graph-powershell-v1.0\Microsoft.Graph.Users",
75+
[string] $GraphProfilePath = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Users"),
7676
[ValidateNotNullOrEmpty()]
7777
[string] $Module = "Users",
7878
[ValidateNotNullOrEmpty()]
7979
[string] $ModulePrefix = "Microsoft.Graph",
8080
[Hashtable] $OpenApiContent
8181
)
82-
$ModuleManifestFile = (Join-Path $SDKDocsPath "\$Module\$GraphProfile\$ModulePrefix.$Module.psd1")
82+
$ModuleManifestFile = (Join-Path $SDKDocsPath $Module $GraphProfile "$ModulePrefix.$Module.psd1")
8383
$ModuleManifestFileContent = Get-Content -Path $ModuleManifestFile
8484
$ProfileGraph = "v1.0"
8585
if ($GraphProfile -eq "beta") {
@@ -131,7 +131,7 @@ function Get-ExternalDocsUrl {
131131
[string] $Command = "Get-MgUser",
132132
[Hashtable] $OpenApiContent,
133133
[System.Object] $Method = "GET",
134-
[string] $File = "..\microsoftgraph-docs-powershell\microsoftgraph\graph-powershell-v1.0\Microsoft.Graph.Users\Get-MgUser.md",
134+
[string] $File = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Users/Get-MgUser.md"),
135135
[string] $Module = "Users"
136136
)
137137
if ($UriPath) {
@@ -247,7 +247,7 @@ function WebScrapping {
247247
[string] $ExternalDocUrl = "https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=powershell",
248248
[ValidateNotNullOrEmpty()]
249249
[string] $Command = "Get-MgUser",
250-
[string] $File = "..\microsoftgraph-docs-powershell\microsoftgraph\graph-powershell-v1.0\Microsoft.Graph.Users\Get-MgUser.md"
250+
[string] $File = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Users/Get-MgUser.md")
251251
)
252252
$WebResponse = Invoke-WebRequest -Uri $ExternalDocUrl
253253
$HtmlDom = ConvertFrom-Html $WebResponse
@@ -291,7 +291,7 @@ function WebScrapping {
291291
}
292292
Set-Location microsoftgraph-docs-powershell
293293
$date = Get-Date -Format "dd-MM-yyyy"
294-
$proposedBranch = "weekly_v2_docs_update_"+$date
294+
$proposedBranch = "weekly_v2_docs_update_29-06-2023"
295295
$exists = git branch -l $proposedBranch
296296
if ([string]::IsNullOrEmpty($exists)) {
297297
git checkout -b $proposedBranch

scripts/UpdateLinks.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Param(
77
[System.Collections.Generic.HashSet[string]]$V1CommandListVariantList= @(),
88
[System.Collections.Generic.HashSet[string]]$BetaCommandListVariantList= @(),
99
[string] $ModuleMappingConfigPath =(Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"),
10-
[string] $SDKDocsPath = ("..\msgraph-sdk-powershell\src"),
11-
[string] $WorkLoadDocsPath = ("..\microsoftgraph-docs-powershell\microsoftgraph"),
12-
[string] $GraphDocsPath = ("..\microsoft-graph-docs")
10+
[string] $SDKDocsPath = (Join-Path $PSScriptRoot "../../msgraph-sdk-powershell/src"),
11+
[string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"),
12+
[string] $GraphDocsPath = (Join-Path $PSScriptRoot "../../microsoft-graph-docs")
1313
)
1414

1515
function Start-Update {
@@ -50,7 +50,7 @@ function Get-FilesByProfile {
5050
function Get-Files {
5151
param(
5252
[ValidateNotNullOrEmpty()]
53-
[string] $GraphProfilePath = "..\microsoftgraph-docs-powershell\microsoftgraph\graph-powershell-v1.0\Microsoft.Graph.Users",
53+
[string] $GraphProfilePath = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Users"),
5454
[ValidateNotNullOrEmpty()]
5555
[string] $Module = "Users",
5656
[ValidateNotNullOrEmpty()]

0 commit comments

Comments
 (0)