Skip to content

Commit

Permalink
print version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alif Rachmawadi committed Jul 25, 2022
1 parent e5fb139 commit b1d33bc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ expand_key() {
echo "$expanded_key"
}

print_version() {
version_debug=$(echo "$VERSION_MANIFEST" | jq -j '.channel,":",.version,":",.dart_sdk_arch')
echo "$CHANNEL:$VERSION:$ARCH|$version_debug"
}

if [[ -n "$PRINT_MODE" ]]; then
if [[ "$CHANNEL" == master ]]; then
if [[ "$PRINT_MODE" == version ]]; then
Expand Down Expand Up @@ -180,10 +185,8 @@ if [[ -n "$PRINT_MODE" ]]; then
fi

if [[ "$PRINT_MODE" == version ]]; then
VERSION_DEBUG=$(echo "$VERSION_MANIFEST" | jq -j '.channel,":",.version,":",.dart_sdk_arch')

echo "$CHANNEL:$VERSION:$ARCH|$VERSION_DEBUG"
exit $?
print_version
exit 0
fi

if [[ "$PRINT_MODE" == cache-key ]]; then
Expand Down Expand Up @@ -214,6 +217,7 @@ if [[ ! -x "$SDK_CACHE/bin/flutter" ]]; then

ARCHIVE_PATH=$(echo "$VERSION_MANIFEST" | jq -r '.archive')
download_archive "$ARCHIVE_PATH" "$SDK_CACHE"
print_version
fi
fi

Expand Down

0 comments on commit b1d33bc

Please sign in to comment.