bpo-37354: Sign Activate.ps1 for release (GH-15235) · python/cpython@3e34a25

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,7 @@

1+

parameters:

2+

Include: '*.exe, *.dll, *.pyd, *.cat, *.ps1'

3+

Exclude: 'vcruntime*, libffi*, libcrypto*, libssl*'

4+
15

jobs:

26

- job: Sign_Python

37

displayName: Sign Python binaries

@@ -17,7 +21,7 @@ jobs:

1721

Name: amd64

1822
1923

steps:

20-

- checkout: none

24+

- template: ./checkout.yml

2125

- template: ./find-sdk.yml

2226
2327

- powershell: |

@@ -31,13 +35,18 @@ jobs:

3135

targetPath: $(Build.BinariesDirectory)\bin

3236
3337

- powershell: |

34-

$files = (gi *.exe, *.dll, *.pyd, *.cat -Exclude vcruntime*, libffi*, libcrypto*, libssl*)

38+

copy "$(Build.SourcesDirectory)\Lib\venv\scripts\common\Activate.ps1" .

39+

displayName: 'Copy files from source'

40+

workingDirectory: $(Build.BinariesDirectory)\bin

41+
42+

- powershell: |

43+

$files = (gi ${{ parameters.Include }} -Exclude ${{ parameters.Exclude }})

3544

signtool sign /a /n "$(SigningCertificate)" /fd sha256 /d "$(SigningDescription)" $files

3645

displayName: 'Sign binaries'

3746

workingDirectory: $(Build.BinariesDirectory)\bin

3847
3948

- powershell: |

40-

$files = (gi *.exe, *.dll, *.pyd, *.cat -Exclude vcruntime*, libffi*, libcrypto*, libssl*)

49+

$files = (gi ${{ parameters.Include }} -Exclude ${{ parameters.Exclude }})

4150

$failed = $true

4251

foreach ($retry in 1..10) {

4352

signtool timestamp /t http://timestamp.verisign.com/scripts/timestamp.dll $files