3
3
Param (
4
4
$ModulesToGenerate = @ (),
5
5
[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" ),
11
11
[hashtable ]$V1CommandGetVariantList = @ {},
12
12
[hashtable ]$BetaCommandGetVariantList = @ {},
13
13
[hashtable ]$V1CommandListVariantList = @ {},
@@ -56,8 +56,8 @@ function Get-FilesByProfile {
56
56
$ModulesToGenerate | ForEach-Object {
57
57
$ModuleName = $_
58
58
$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"
61
61
# test this path first before proceeding
62
62
if (Test-Path $OpenApiFile ) {
63
63
$YamlContent = Get-Content - Path $OpenApiFile
@@ -72,14 +72,14 @@ function Get-Files {
72
72
[ValidateSet (" beta" , " v1.0" )]
73
73
[string ] $GraphProfile = " v1.0" ,
74
74
[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" ) ,
76
76
[ValidateNotNullOrEmpty ()]
77
77
[string ] $Module = " Users" ,
78
78
[ValidateNotNullOrEmpty ()]
79
79
[string ] $ModulePrefix = " Microsoft.Graph" ,
80
80
[Hashtable ] $OpenApiContent
81
81
)
82
- $ModuleManifestFile = (Join-Path $SDKDocsPath " \ $Module \ $GraphProfile \ $ModulePrefix .$Module .psd1" )
82
+ $ModuleManifestFile = (Join-Path $SDKDocsPath $Module $GraphProfile " $ModulePrefix .$Module .psd1" )
83
83
$ModuleManifestFileContent = Get-Content - Path $ModuleManifestFile
84
84
$ProfileGraph = " v1.0"
85
85
if ($GraphProfile -eq " beta" ) {
@@ -131,7 +131,7 @@ function Get-ExternalDocsUrl {
131
131
[string ] $Command = " Get-MgUser" ,
132
132
[Hashtable ] $OpenApiContent ,
133
133
[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" ) ,
135
135
[string ] $Module = " Users"
136
136
)
137
137
if ($UriPath ) {
@@ -247,7 +247,7 @@ function WebScrapping {
247
247
[string ] $ExternalDocUrl = " https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=powershell" ,
248
248
[ValidateNotNullOrEmpty ()]
249
249
[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" )
251
251
)
252
252
$WebResponse = Invoke-WebRequest - Uri $ExternalDocUrl
253
253
$HtmlDom = ConvertFrom-Html $WebResponse
@@ -291,7 +291,7 @@ function WebScrapping {
291
291
}
292
292
Set-Location microsoftgraph- docs- powershell
293
293
$date = Get-Date - Format " dd-MM-yyyy"
294
- $proposedBranch = " weekly_v2_docs_update_ " + $date
294
+ $proposedBranch = " weekly_v2_docs_update_29-06-2023 "
295
295
$exists = git branch - l $proposedBranch
296
296
if ([string ]::IsNullOrEmpty($exists )) {
297
297
git checkout - b $proposedBranch
0 commit comments