mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Fix sed/awk usage in windows ci jobs
The addition of sed and awk, while available in the windows vm's for CI in powershell, don't behave as I would expect (though the same commands work with a local installation on windows using GnuWin32). In trying to figure out what was going on I found it was far more stable and predictable to use the powershell -split and -replace commands instead of sed and awk Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24450)
This commit is contained in:
parent
a8f99f98d6
commit
aa08335852
6
.github/workflows/windows.yml
vendored
6
.github/workflows/windows.yml
vendored
@ -56,9 +56,9 @@ jobs:
|
||||
run: |
|
||||
$Env:OPENSSL_CONF="apps\openssl.cnf"
|
||||
apps/openssl.exe version -v
|
||||
apps/openssl.exe version -v | awk '{print $2}'
|
||||
apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/'
|
||||
echo "OSSL_VERSION=$(apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
apps/openssl.exe version -v | %{($_ -split '\s+')[1]}
|
||||
apps/openssl.exe version -v | %{($_ -split '\s+')[1] -replace '([0-9]+\.[0-9]+)(\..*)','$1'}
|
||||
echo "OSSL_VERSION=$(apps/openssl.exe version -v | %{($_ -split '\s+')[1] -replace '([0-9]+\.[0-9]+)(\..*)','$1'})" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: Set registry keys
|
||||
working-directory: _build
|
||||
run: |
|
||||
|
6
.github/workflows/windows_comp.yml
vendored
6
.github/workflows/windows_comp.yml
vendored
@ -38,9 +38,9 @@ jobs:
|
||||
run: |
|
||||
$Env:OPENSSL_CONF="apps\openssl.cnf"
|
||||
apps/openssl.exe version -v
|
||||
apps/openssl.exe version -v | awk '{print $2}'
|
||||
apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/'
|
||||
echo "OSSL_VERSION=$(apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
apps/openssl.exe version -v | %{($_ -split '\s+')[1]}
|
||||
apps/openssl.exe version -v | %{($_ -split '\s+')[1] -replace '([0-9]+\.[0-9]+)(\..*)','$1'}
|
||||
echo "OSSL_VERSION=$(apps/openssl.exe version -v | %{($_ -split '\s+')[1] -replace '([0-9]+\.[0-9]+)(\..*)','$1'})" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: Set registry keys
|
||||
working-directory: _build
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user