Files
threshold/internal/tests/cli/boundary/_version.bash
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
514 B
Bash
Raw Normal View History

2023-02-02 17:15:17 -08:00
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
function version() {
boundary version -format json
}
function version_is_valid() {
if [ "$IS_VERSION" = "" ]; then
skip "not a version build"
fi
ver=$($(strip version) | jq -c '.version' | cut -d 'v' -f2)
if [ "$ver" == "null" ]; then
return 1
fi
return 0
}
function revision_is_valid() {
len=$($(strip version) | jq -c '.revision' | cut -d '+' -f1 | wc -m)
if [ "$len" -eq 43 ]; then
return 0
fi
return 1
}