Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Anka fixes for sed weirdness.
Browse files Browse the repository at this point in the history
  • Loading branch information
williamblevins committed Mar 11, 2021
1 parent cb9ef32 commit 0516869
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/print-build-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ if [[ $EXIT_CODE -eq 0 ]]; then
fi

OUTPUT=$(echo "$OUTPUT" | tr -d '\r\n')
OUTPUT=$(echo "$OUTPUT" | sed 's/^.\+JSON://')
OUTPUT=$(echo "$OUTPUT" | sed 's/}.\+$/}/')
OUTPUT=$(echo "$OUTPUT" | sed -E 's/^.+JSON://')
OUTPUT=$(echo "$OUTPUT" | sed -E 's/}.+$/}/')

JQ_OUTPUT=$(echo "$OUTPUT" | jq type)
EXIT_CODE=$?
Expand Down Expand Up @@ -48,10 +48,10 @@ if [[ "$PLATFORM_TYPE" == "pinned" ]]; then
exit 1
fi
FILE=$(ls $EOSIO_ROOT/.cicd/platforms/pinned/$IMAGE_TAG* | head)
BOOST=$(cat $FILE | grep boost | tr -d '\r\n' | sed 's/^.\+boost_\([0-9_]\+\) .\+$/\1/' | head)
BOOST_MAJOR=$(echo $BOOST | sed 's/^\([0-9]\)\+_[0-9]\+_[0-9]\+$/\1/')
BOOST_MINOR=$(echo $BOOST | sed 's/^[0-9]\+_\([0-9]\+\)_[0-9]\+$/\1/')
BOOST_PATCH=$(echo $BOOST | sed 's/^[0-9]\+_[0-9]\+_\([0-9]\)\+$/\1/')
BOOST=$(cat $FILE | grep boost | tr -d '\r\n' | sed -E 's/^.+boost_([0-9]+_[0-9]+_[0-9]+).+$/\1/' | head)
BOOST_MAJOR=$(echo $BOOST | sed -E 's/^([0-9])+_[0-9]+_[0-9]+$/\1/')
BOOST_MINOR=$(echo $BOOST | sed -E 's/^[0-9]+_([0-9]+)_[0-9]+$/\1/')
BOOST_PATCH=$(echo $BOOST | sed -E 's/^[0-9]+_[0-9]+_([0-9])+$/\1/')
E_BOOST=$(printf "%d%03d%02d" $BOOST_MAJOR $BOOST_MINOR $BOOST_PATCH)

echo "Verifying boost version: \"$E_BOOST\" == \"$V_BOOST\"."
Expand Down

0 comments on commit 0516869

Please sign in to comment.