Skip to content

Commit 82c196b

Browse files
committed
Simplify default parameters, move dir
1 parent 7e0c41a commit 82c196b

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

tools/repoUpdateScripts/updateAzureDataStudio.ps1 renamed to tools/postReleaseScripts/updateAzureDataStudio.ps1

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ param(
2020

2121
[Parameter()]
2222
[string]
23-
$BranchName,
23+
$BranchName = "update-psext-$ExtensionVersion",
2424

2525
[Parameter()]
2626
[string]
27-
$PRDescription
27+
$PRDescription = "Updates the version of the PowerShell extension in ADS to $ExtensionVersion.`n**Note**: This is an automated PR."
2828
)
2929

3030
Import-Module "$PSScriptRoot/../GitHubTools.psm1" -Force
@@ -235,16 +235,6 @@ function UpdateGalleryFile
235235

236236
$repoLocation = Join-Path ([System.IO.Path]::GetTempPath()) 'ads-temp-checkout'
237237

238-
if (-not $BranchName)
239-
{
240-
$BranchName = "update-psext-$ExtensionVersion"
241-
}
242-
243-
if (-not $PRDescription)
244-
{
245-
$PRDescription = "Updates the version of the PowerShell extension in ADS to $ExtensionVersion.`n**Note**: This is an automated PR."
246-
}
247-
248238
$cloneParams = @{
249239
OriginRemote = 'https://github.com/rjmholt/AzureDataStudio'
250240
Destination = $repoLocation

tools/repoUpdateScripts/updateExtensionVersions.ps1 renamed to tools/postReleaseScripts/updateExtensionVersions.ps1

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ param(
2222

2323
[Parameter()]
2424
[string]
25-
$BranchName,
25+
$BranchName = "update-version-$newVersionStr",
2626

2727
[Parameter()]
2828
[string]
29-
$PRDescription
29+
$PRDescription = "Updates version strings in vscode-PowerShell to $newVersionStr.`n**Note**: This is an automated PR."
3030
)
3131

3232
Import-Module -Force "$PSScriptRoot/../FileUpdateTools.psm1"
@@ -237,16 +237,6 @@ $newVersionStr = $NewVersion.ToString()
237237
$psesVersion = GetVersionFromSemVer -SemVer $NewVersion
238238
$marketPlaceVersion = GetMarketplaceVersionFromSemVer -SemVer $NewVersion
239239

240-
if (-not $BranchName)
241-
{
242-
$BranchName = "update-version-$newVersionStr"
243-
}
244-
245-
if (-not $PRDescription)
246-
{
247-
$PRDescription = "Updates version strings in vscode-PowerShell to $newVersionStr.`n**Note**: This is an automated PR."
248-
}
249-
250240
# Finally create the new package.json file
251241
$newPkgJsonContent = ReplaceStringSegment -String $packageJson -NewSegment $newVersionStr -StartIndex $pkgJsonVersionOffsetSpan.Start -EndIndex $pkgJsonVersionOffsetSpan.End
252242
SetFileContent -FilePath $paths.packageJson -Value $newPkgJsonContent

tools/repoUpdateScripts/updatePsesVersions.ps1 renamed to tools/postReleaseScripts/updatePsesVersions.ps1

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ param(
2222

2323
[Parameter()]
2424
[string]
25-
$BranchName,
25+
$BranchName = "update-pses-version-$NewVersion",
2626

2727
[Parameter()]
2828
[string]
29-
$PRDescription
29+
$PRDescription = "Updates PSES to version $NewVersion.**Note**: This is an automated PR."
3030
)
3131

3232
Import-Module "$PSScriptRoot/../GitHubTools.psm1" -Force
@@ -158,16 +158,6 @@ $paths = @{
158158
manifest = "$repoLocation/module/PowerShellEditorServices/PowerShellEditorServices.psd1"
159159
}
160160

161-
if (-not $BranchName)
162-
{
163-
$BranchName = "update-pses-version-$NewVersion"
164-
}
165-
166-
if (-not $PRDescription)
167-
{
168-
$PRDescription = "Updates PSES to version $NewVersion.**Note**: This is an automated PR."
169-
}
170-
171161
# Clone the PSES repo
172162
$cloneParams = @{
173163
OriginRemote = 'https://github.com/rjmholt/PowerShellEditorServices'

0 commit comments

Comments
 (0)