github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/ci/cli-release/tasks/sign-windows-binaries.yml (about)

     1  ---
     2  platform: windows
     3  
     4  inputs:
     5  - name: edge-windows-binary-32
     6  - name: edge-windows-binary-64
     7  - name: cli-ci
     8  
     9  outputs:
    10  - name: extracted-binaries
    11  
    12  params:
    13    TARGET_V7:
    14  
    15  run:
    16    path: powershell.exe
    17    args:
    18    - -command
    19    - |
    20      # Print current directory & contents to make debugging easier, for we cannot hijack, but we can `cd`
    21      Get-ChildItem
    22  
    23      if ($env:TARGET_V7 -eq "true") {
    24        Set-Variable Suffix "7"
    25      } else {
    26        Set-Variable Suffix ""
    27      }
    28  
    29      Expand-Archive -LiteralPath .\edge-windows-binary-32\cf${Suffix}-cli_edge_win32.zip
    30      Expand-Archive -LiteralPath .\edge-windows-binary-64\cf${Suffix}-cli_edge_winx64.zip
    31  
    32      & 'C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe' `
    33        sign `
    34        /tr http://timestamp.sectigo.com `
    35        /td sha256 `
    36        /fd sha256 `
    37        /n "Cloudfoundry.org Foundation, Inc" `
    38        .\cf${Suffix}-cli_edge_win32\cf${Suffix}.exe
    39      Move-Item .\cf${Suffix}-cli_edge_win32\cf${Suffix}.exe .\extracted-binaries\cf${Suffix}-cli_win32.exe
    40  
    41      & 'C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe' `
    42        sign `
    43        /tr http://timestamp.sectigo.com `
    44        /td sha256 `
    45        /fd sha256 `
    46        /n "Cloudfoundry.org Foundation, Inc" `
    47        .\cf${Suffix}-cli_edge_winx64\cf${Suffix}.exe
    48      Move-Item .\cf${Suffix}-cli_edge_winx64\cf${Suffix}.exe .\extracted-binaries\cf${Suffix}-cli_winx64.exe