mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
ci: tolerate the lack of tags in the repository (#1296)
This commit is contained in:
parent
ce16c638b7
commit
e1fd8ad970
@ -35,22 +35,26 @@ teardown() {
|
|||||||
|
|
||||||
@test "asdf update should checkout the latest non-RC tag" {
|
@test "asdf update should checkout the latest non-RC tag" {
|
||||||
local tag=$(git tag | grep -vi "rc" | tail -1)
|
local tag=$(git tag | grep -vi "rc" | tail -1)
|
||||||
run asdf update
|
if [ -n "$tag" ]; then
|
||||||
[ "$status" -eq 0 ]
|
run asdf update
|
||||||
cd $ASDF_DIR
|
[ "$status" -eq 0 ]
|
||||||
git tag | grep $tag
|
cd $ASDF_DIR
|
||||||
[ "$?" -eq 0 ]
|
git tag | grep $tag
|
||||||
|
[ "$?" -eq 0 ]
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "asdf update should checkout the latest tag when configured with use_release_candidates = yes" {
|
@test "asdf update should checkout the latest tag when configured with use_release_candidates = yes" {
|
||||||
local tag=$(git tag | tail -1)
|
local tag=$(git tag | tail -1)
|
||||||
export ASDF_CONFIG_DEFAULT_FILE=$BATS_TMPDIR/asdfrc_defaults
|
if [ -n "$tag" ]; then
|
||||||
echo "use_release_candidates = yes" >$ASDF_CONFIG_DEFAULT_FILE
|
export ASDF_CONFIG_DEFAULT_FILE=$BATS_TMPDIR/asdfrc_defaults
|
||||||
run asdf update
|
echo "use_release_candidates = yes" >$ASDF_CONFIG_DEFAULT_FILE
|
||||||
[ "$status" -eq 0 ]
|
run asdf update
|
||||||
cd $ASDF_DIR
|
[ "$status" -eq 0 ]
|
||||||
git tag | grep $tag
|
cd $ASDF_DIR
|
||||||
[ "$?" -eq 0 ]
|
git tag | grep $tag
|
||||||
|
[ "$?" -eq 0 ]
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "asdf update is a noop for when updates are disabled" {
|
@test "asdf update is a noop for when updates are disabled" {
|
||||||
|
Loading…
Reference in New Issue
Block a user