Skip to content

Creating index.json for Docs #5831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 30, 2018
Merged

Creating index.json for Docs #5831

merged 8 commits into from
Mar 30, 2018

Conversation

maddieclayton
Copy link
Contributor

@maddieclayton maddieclayton commented Mar 28, 2018

Description

Won't merge until we get sign-off from Docs.

#5806

Checklist

@maddieclayton
Copy link
Contributor Author

@@ -9,6 +9,7 @@ $output = Join-Path (Get-Item $PSScriptRoot).Parent.FullName "src\Package\$Build
Write-Verbose "The output folder is set to $output"
$serviceManagementPath = Join-Path $output "ServiceManagement\Azure"
$resourceManagerPath = Join-Path $output "ResourceManager\AzureResourceManager"
$stackPath = "src\Stack\$BuildConfig\ResourceManager\AzureResourceManager"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton we should make sure that we're using the full path here, like we do for the above $output variable

$stackOutput = Join-Path (Get-Item $PSScriptRoot).Parent.FullName "src\Stack\$BuildConfig"
$stackPath = Join-Path $stackOutput "ResourceManager\AzureResourceManager"

[string] $OutputFile = "groupMapping.json",
[string] $WarningFile = "groupMappingWarnings.json",
[string] $RulesFile = "CreateMappings_rules.json"
[string] $RootPath = "$PSCommandPath\..\..\src",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton any reason to not keep these variables the same?

@@ -50,14 +50,14 @@ function Get-TargetModules
if ($listOfModules.Count -ge 1)
{
$moduleList | ForEach-Object {
$targets += Find-Module -Name $_ -Repository $repoName
$targets += Find-Module -Name $_ -Repository $repoName -AllowPrerelease
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton we may need to check for version 1.6.0 or greater of PowerShellGet before calling one of the module's cmdlets with -AllowPrerelease, or we could put a #requires at the top that specifies you need at least that version of PowerShellGet before running this script

if ([string]::isNullOrEmpty($Version))
{
Import-LocalizedData -BindingVariable "AzureRMpsd1" -BaseDirectory $PSCommandPath/../AzureRM -FileName "AzureRM.psd1"
$Version = $AzureRMpsd1.ModuleVersion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton for the places where we're using "default values" (Version, SourceBaseUri, EditBaseUri), we should write a message to the screen letting the user know what the values are being set to

[Parameter(Mandatory = $false)]
[string] $BuildConfig = "Debug",
[Parameter(Mandatory = $false)]
[string] $OutputFile = "$PSCommandPath/../index.json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton any reason for using $PSCommandPath over $PSScriptRoot? You could save yourself from typing an extra /.. each time ☺️

@maddieclayton
Copy link
Contributor Author

@@ -12,7 +12,7 @@
# limitations under the License.
# ----------------------------------------------------------------------------------

#Requires -Modules AzureRM.KeyVault
#Requires -Modules AzureRM.KeyVault, PowerShellGet > 1,6,0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton

#Requires -Modules AzureRM.KeyVault, @{ModuleName='PowerShellGet';ModuleVersion='1.6.0'}

# ----------------------------------------------------------------------------------

[CmdletBinding(
SupportsShouldProcess=$true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maddieclayton nit: if we're not doing anything with this in the script, we should remove it

@maddieclayton maddieclayton merged commit 75708aa into Azure:preview Mar 30, 2018
@maddieclayton maddieclayton deleted the indexscript branch March 30, 2018 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants