Skip to content

Commit

Permalink
Add JFrog CLI windows binary certificate validation (#2448)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 authored Mar 18, 2024
1 parent 290f8fd commit 4dda193
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/scriptTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,34 @@ jobs:
sh build/getcli/jfrog.sh
./jfrog --version
- name: Check Windows Certificate Expiration Date
shell: pwsh
run: |
$signature = Get-AuthenticodeSignature -FilePath ./jfrog.exe
$expirationDate = $signature.SignerCertificate.NotAfter
Write-Host "Certificate Expiration Date: $expirationDate"
$daysUntilExpiration = ($expirationDate - (Get-Date)).Days
if ($daysUntilExpiration -lt 30) {
Write-Host "The JFrog CLI Windows binary's certificate will expire within $daysUntilExpiration days."
exit 1
}
if: contains( matrix.suite.os, 'windows')

- name: Test Build CLI - sh
run: |
rm ./jf
sh build/build.sh
./jf${{ matrix.suite.osSuffix }} --version
./jf --version
if: contains( matrix.suite.os, 'macos') || contains( matrix.suite.os, 'ubuntu')

- name: Test Build CLI - bat
run: |
rm ./jfrog.exe
build/build.bat
./jf${{ matrix.suite.osSuffix }} --version
./jfrog.exe --version
if: contains( matrix.suite.os, 'windows')

# Prior to the release, we set the new version in the package.json files, introducing the prereleased version.
# Prior to the release, we set the new version in the package.json files, introducing the pre-released version.
# This adjustment may result in an attempt to download a version that hasn't been published to releases.jfrog.io yet.
# To handle it, we fetch the most recent JFrog CLI release and store it in the LATEST_RELEASE step output.
- name: "Get latest release"
Expand Down

0 comments on commit 4dda193

Please sign in to comment.