File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 matrix :
1111 os : ['windows-2022']
1212 download_official_python_msi : ["true", "false"]
13+ remove_python_pycs : ["true", "false"]
1314 cbsinit_repo : ['https://github.com/cloudbase/cloudbase-init']
1415 cbsinit_branch : ['master']
1516 python_version : ['3.14_4']
@@ -32,10 +33,11 @@ jobs:
3233 -CloudbaseInitRepoUrl ${{ matrix.cbsinit_repo }} ^
3334 -CloudbaseInitRepoBranch ${{ matrix.cbsinit_branch }} ^
3435 -InstallOfficialPythonMsi:$${{ matrix.download_official_python_msi }} ^
35- -OfficialPythonMsiChecksum "C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4"
36+ -OfficialPythonMsiChecksum "C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4" ^
37+ -RemovePythonPycs:$${{ matrix.remove_python_pycs }}
3638 - uses : actions/upload-artifact@v7
3739 with :
38- name : " CloudbaseInit_${{ matrix.platform }}_${{ matrix.os }}_MSI_${{ matrix.cbsinit_branch }}"
40+ name : " CloudbaseInit_${{ matrix.platform }}_${{ matrix.os }}_${{ matrix.download_official_python_msi }}_${{ matrix.remove_python_pycs }} _MSI_${{ matrix.cbsinit_branch }}"
3941 path : ' CloudbaseInitSetup/bin/release/${{ matrix.platform }}/CloudbaseInitSetup.msi'
4042 - name : Download external dependencies
4143 shell : powershell
Original file line number Diff line number Diff line change 1212 [string ]$SignTimestampUrl = " http://timestamp.digicert.com?alg=sha256" ,
1313 [string ]$VCVars = " 2019" ,
1414 [switch ]$InstallOfficialPythonMsi = $false ,
15- [string ]$OfficialPythonMsiChecksum = " C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4"
15+ [string ]$OfficialPythonMsiChecksum = " C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4" ,
16+ [switch ]$RemovePythonPycs = $false
1617)
1718
1819$ErrorActionPreference = " Stop"
128129 ExecRetry { PullInstall " cloudbase-init" $CloudbaseInitRepoUrl $CloudbaseInitRepoBranch }
129130 }
130131
132+ if ($RemovePythonPycs ) {
133+ pushd $python_dir
134+ Get-ChildItem - Path .\ - Recurse - Include * __pycache__ | foreach ($_ ) { Remove-Item $_.FullName - Force - Recurse}
135+ Get-ChildItem - Path .\ - Recurse - Include * .pyc | foreach ($_ ) { Remove-Item $_.FullName - Force - Recurse}
136+ popd
137+ }
131138 $release_dir = join-path $cloudbaseInitInstallerDir " CloudbaseInitSetup\bin\Release\$platform "
132139 $bin_dir = join-path $cloudbaseInitInstallerDir " CloudbaseInitSetup\Binaries\$platform "
133140
You can’t perform that action at this time.
0 commit comments