Skip to content

Commit

Permalink
alpine check in unpack script
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed May 10, 2024
1 parent 169120d commit b124f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- name: test ${{ matrix.os }} package
if: ${{ matrix.alpine == false }}
if: ${{ matrix.docker == false }}
run: ./script/unpack-and-test.sh
- name: test alpine ${{ matrix.arch }} package
if: ${{ matrix.alpine == true }}
Expand Down
3 changes: 2 additions & 1 deletion script/unpack-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ echo detected_os = $detected_os
BINARY_OS=${BINARY_OS:-}
BINARY_ARCH=${BINARY_ARCH:-}
FILE_EXT=${FILE_EXT:-}
ALPINE=$(cat /etc/os-release | grep -i alpine &>/dev/null && echo true || false)

if [ "$BINARY_OS" == "" ] || [ "$BINARY_ARCH" == "" ] ; then
case ${detected_os} in
Expand Down Expand Up @@ -93,7 +94,7 @@ for tool in ${tools[@]}; do
if [ "$BINARY_OS" != "windows" ] ; then echo "no bat file ext needed for $(uname -a)" ; else FILE_EXT=.bat; fi
if [ "$BINARY_OS" = "windows" ] && [ "$tool" = "pact-plugin-cli" ] ; then FILE_EXT=.exe ; else echo "no exe file ext needed for $(uname -a)"; fi
echo executing ${PATH_TO_BIN}${tool}${FILE_EXT}
if [ "$BINARY_ARCH" = "x86" ] && [ "$tool" = "pact-plugin-cli" ] ; then echo "skipping for x86" ; else ${PATH_TO_BIN}${tool}${FILE_EXT} help; fi
if [ "$BINARY_ARCH" = "x86" ] && [ "$tool" = "pact-plugin-cli" ] || [ "$ALPINE" = true ] && [ "$tool" = "pact-plugin-cli" ] ; then echo "skipping for x86" ; else ${PATH_TO_BIN}${tool}${FILE_EXT} help; fi
done


0 comments on commit b124f4e

Please sign in to comment.