Skip to content

Commit 71ab80f

Browse files
committed
add build pythonCWMS.bat
1 parent 6820d3d commit 71ab80f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,41 @@ jobs:
176176
$winpythonSubDir = $winpythonDir.Name
177177
echo "WINPYTHON_SUBDIR=$winpythonSubDir" >> $env:GITHUB_ENV
178178
Write-Host "WinPython subdirectory: $winpythonSubDir"
179+
180+
- name: Create pythonCWMS.bat launcher
181+
run: |
182+
$finalDir = "${{ env.FINAL_DIR }}"
183+
$pythonDir = Join-Path $finalDir "python"
184+
185+
Write-Host "Creating pythonCWMS.bat in: $pythonDir"
186+
187+
# Verify the python directory exists
188+
if (-not (Test-Path $pythonDir)) {
189+
Write-Error "Python directory not found at: $pythonDir"
190+
Write-Host "Contents of final directory:"
191+
Get-ChildItem -Path $finalDir | ForEach-Object { Write-Host " $($_.Name)" }
192+
exit 1
193+
}
179194
195+
# Create the batch file content
196+
$batContent = '@"%~dp0python.exe" %*'
197+
$batPath = Join-Path $pythonDir "pythonCWMS.bat"
198+
199+
# Write the batch file
200+
$batContent | Out-File -FilePath $batPath -Encoding ASCII
201+
202+
Write-Host "✓ Created pythonCWMS.bat at: $batPath"
203+
Write-Host "✓ Batch file content: $batContent"
204+
205+
# Verify it was created
206+
if (Test-Path $batPath) {
207+
Write-Host "✓ Batch file successfully created"
208+
Write-Host "File contents:"
209+
Get-Content $batPath | ForEach-Object { Write-Host " $_" }
210+
} else {
211+
Write-Error "❌ Failed to create batch file"
212+
exit 1
213+
}
180214
- name: Install 7-Zip
181215
run: |
182216
Write-Host "Installing 7-Zip..."

0 commit comments

Comments
 (0)