Skip to content

Commit ccc3f60

Browse files
authored
Revert "Fix Python emitter CI publish failure: stamp prerelease version in Build-Packages.ps1" (#10881)
Reverts #10817 After discussion, we revert this PR to avoid duplicated alpha release for same python emitter content.
1 parent 8e3c0ba commit ccc3f60

1 file changed

Lines changed: 2 additions & 17 deletions

File tree

packages/http-client-python/eng/scripts/Build-Packages.ps1

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ New-Item -ItemType Directory -Force -Path "$outputPath/packages" | Out-Null
7575
$emitterVersion = node -p -e "require('$packageRoot/package.json').version"
7676
Write-Host "Package version: $emitterVersion"
7777

78-
# Stamp prerelease version if BuildNumber is provided
79-
if ($BuildNumber) {
80-
$versionTag = $Prerelease ? "-alpha" : "-beta"
81-
$emitterVersion = "$emitterVersion$versionTag.$BuildNumber"
82-
Write-Host "Stamped prerelease version: $emitterVersion"
83-
}
84-
8578
Push-Location "$packageRoot"
8679
try {
8780
# Step 1: Build the emitter and generator
@@ -94,20 +87,12 @@ try {
9487
Invoke-LoggedCommand "npm run lint" -GroupOutput
9588
}
9689

97-
# Step 3: Stamp version in package.json if prerelease
98-
if ($BuildNumber) {
99-
Write-Host "`n=== Updating package.json version to $emitterVersion ===" -ForegroundColor Cyan
100-
$packageJson = Get-Content -Raw "package.json" | ConvertFrom-Json -AsHashtable
101-
$packageJson.version = $emitterVersion
102-
$packageJson | ConvertTo-Json -Depth 100 | Out-File -Path "package.json" -Encoding utf8 -NoNewline -Force
103-
}
104-
105-
# Step 4: Create npm package
90+
# Step 3: Create npm package
10691
Write-Host "`n=== Creating npm package ===" -ForegroundColor Cyan
10792
Invoke-LoggedCommand "npm pack"
10893
Copy-Item "typespec-http-client-python-$emitterVersion.tgz" -Destination "$outputPath/packages"
10994

110-
# Step 5: Verify package can be installed
95+
# Step 4: Verify package can be installed
11196
Write-Host "`n=== Verifying package installation ===" -ForegroundColor Cyan
11297
Invoke-LoggedCommand "npm install typespec-http-client-python-$emitterVersion.tgz" -GroupOutput
11398

0 commit comments

Comments
 (0)