Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 34 additions & 26 deletions .github/workflows/check-certificates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ jobs:
-legacy \
-noout \
-passin env:CERTIFICATE_PASSWORD
) || (
) \
|| \
(
echo "::error::Verification of ${{ matrix.certificate.identifier }} failed!!!"
exit 1
)
Expand All @@ -124,39 +126,45 @@ jobs:
run: |
if [[ ${{ matrix.certificate.type }} == "pkcs12" ]]; then
EXPIRATION_DATE="$(
(
(
openssl pkcs12 \
-in ${{ env.CERTIFICATE_PATH }} \
-clcerts \
-legacy \
-nodes \
-passin env:CERTIFICATE_PASSWORD
) | (
-in ${{ env.CERTIFICATE_PATH }} \
-clcerts \
-legacy \
-nodes \
-passin env:CERTIFICATE_PASSWORD
) \
| \
(
openssl x509 \
-noout \
-enddate
) | (
-noout \
-enddate
) \
| \
(
grep \
--max-count=1 \
--only-matching \
--perl-regexp \
'notAfter=(\K.*)'
)
--max-count=1 \
--only-matching \
--perl-regexp \
'notAfter=(\K.*)'
)
)"
elif [[ ${{ matrix.certificate.type }} == "x509" ]]; then
EXPIRATION_DATE="$(
(
(
openssl x509 \
-in ${{ env.CERTIFICATE_PATH }} \
-noout \
-enddate
) | (
-in ${{ env.CERTIFICATE_PATH }} \
-noout \
-enddate
) \
| \
(
grep \
--max-count=1 \
--only-matching \
--perl-regexp \
'notAfter=(\K.*)'
)
--max-count=1 \
--only-matching \
--perl-regexp \
'notAfter=(\K.*)'
)
)"
fi

Expand Down
14 changes: 8 additions & 6 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ vars:
DEFAULT_GO_MODULE_PATH: ./
DEFAULT_GO_PACKAGES: |
$( \
go list ./... | \
grep --invert-match 'github.com/arduino/arduino-lint/internal/rule/schema/schemadata' | \
tr '\n' ' ' \
go list ./... \
| \
grep --invert-match 'github.com/arduino/arduino-lint/internal/rule/schema/schemadata' \
| \
tr '\n' ' ' \
|| \
echo '"ERROR: Unable to discover Go packages"' \
)
Expand Down Expand Up @@ -589,9 +591,9 @@ tasks:
cmds:
- |
if [[ "{{.OS}}" == "Windows_NT" ]] && which cygpath &>/dev/null; then
# Even though the shell handles POSIX format absolute paths as expected, external applications do not.
# So paths passed to such applications must first be converted to Windows format.
cygpath -w "{{.RAW_PATH}}"
# Even though the shell handles POSIX format absolute paths as expected, external applications do not.
# So paths passed to such applications must first be converted to Windows format.
cygpath -w "{{.RAW_PATH}}"
else
echo "{{.RAW_PATH}}"
fi
Expand Down
Loading