projects
/
feed
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af2e481
)
ci: avoid subshell invocation on APK version check
author
Daniel Golle
<
[email protected]
>
Mon, 19 Aug 2024 14:15:09 +0000
(15:15 +0100)
committer
Rosen Penev
<
[email protected]
>
Mon, 2 Sep 2024 18:02:09 +0000
(11:02 -0700)
Use return code instead of scraping the stdio of `apk version --check`.
Signed-off-by: Daniel Golle <
[email protected]
>
.github/workflows/check-apk-valid-version.yml
patch
|
blob
|
history
diff --git
a/.github/workflows/check-apk-valid-version.yml
b/.github/workflows/check-apk-valid-version.yml
index def88c8648f96cb8091fc70afc6273d16d30e4c7..bc6ce0761fd637b4adcf3f49974ab74d3201b1b3 100644
(file)
--- a/
.github/workflows/check-apk-valid-version.yml
+++ b/
.github/workflows/check-apk-valid-version.yml
@@
-55,7
+55,8
@@
jobs:
fi
PKG_VERSION=$(grep -E '^PKG_VERSION' "$ROOT/Makefile" | cut -f 2 -d '=')
if [ -n "$PKG_VERSION" ]; then
- if [[ -n $($GITHUB_WORKSPACE/apk version --check "$PKG_VERSION") ]]; then
+ $GITHUB_WORKSPACE/apk version --quiet --check "$PKG_VERSION"
+ if [[ "$?" -gt "0" ]]; then
echo "PKG_VERSION is not compatible: $PKG_VERSION"
INCOMPATIBLE_VERSION+=" $ROOT"
fi