Skip to content

Commit 1022a60

Browse files
committed
Delete UpdatePackageJson from vscode-powershell.build.ps1
The `ReleaseTools` module does this, better!
1 parent b93424c commit 1022a60

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

vscode-powershell.build.ps1

+1-36
Original file line numberDiff line numberDiff line change
@@ -137,41 +137,6 @@ task UpdateReadme -If { $script:IsPreviewExtension } {
137137
}
138138
}
139139

140-
task UpdatePackageJson {
141-
if ($script:IsPreviewExtension) {
142-
$script:PackageJson.name = "powershell-preview"
143-
$script:PackageJson.displayName = "PowerShell Preview"
144-
$script:PackageJson.description = "(Preview) Develop PowerShell modules, commands and scripts in Visual Studio Code!"
145-
$script:PackageJson.preview = $true
146-
} else {
147-
$script:PackageJson.name = "powershell"
148-
$script:PackageJson.displayName = "PowerShell"
149-
$script:PackageJson.description = "Develop PowerShell modules, commands and scripts in Visual Studio Code!"
150-
$script:PackageJson.preview = $false
151-
}
152-
153-
$currentVersion = [version](($script:PackageJson.version -split "-")[0])
154-
$currentDate = Get-Date
155-
156-
$revision = if ($currentDate.Month -eq $currentVersion.Minor) {
157-
$currentVersion.Build + 1
158-
} else {
159-
0
160-
}
161-
162-
$script:PackageJson.version = "$($currentDate.ToString('yyyy.M')).$revision"
163-
164-
if ($env:TF_BUILD) {
165-
$script:PackageJson.version += "-CI.$env:BUILD_BUILDID"
166-
}
167-
168-
$Utf8NoBomEncoding = [System.Text.UTF8Encoding]::new($false)
169-
[System.IO.File]::WriteAllLines(
170-
(Resolve-Path "$PSScriptRoot/package.json").Path,
171-
($script:PackageJson | ConvertTo-Json -Depth 100),
172-
$Utf8NoBomEncoding)
173-
}
174-
175140
task Package UpdateReadme, {
176141
if ($script:psesBuildScriptPath -or $env:TF_BUILD) {
177142
Write-Host "`n### Copying PowerShellEditorServices module files" -ForegroundColor Green
@@ -197,4 +162,4 @@ task Package UpdateReadme, {
197162
# The set of tasks for a release
198163
task Release Clean, Build, Package
199164
# The default task is to run the entire CI build
200-
task . CleanAll, BuildAll, Test, UpdatePackageJson, Package, UploadArtifacts
165+
task . CleanAll, BuildAll, Test, Package, UploadArtifacts

0 commit comments

Comments
 (0)