|| die "FELIS_RELEASE must be a release tag like v1.2.3 (got '${FELIS_RELEASE}')"
# Each of these names what to install another way and would silently win, installing
# something other than the release asked for.
[-z"$FELIS_REF_PINNED"]|| die "FELIS_RELEASE and FELIS_REF both name what to install; set one (FELIS_RELEASE installs a published release's assets, FELIS_REF builds a tree from source)"
[-z"$FELIS_ARTIFACT_DIR"]|| die "FELIS_RELEASE and FELIS_ARTIFACT_DIR both name what to install; set one"
[-z"${FELIS_SKIP_FETCH:-}"]|| die "FELIS_RELEASE and FELIS_SKIP_FETCH both name what to install; set one"
["$FELIS_VERSION_BOOTSTRAP"= release ]\
|| die "FELIS_RELEASE names a published release, which the ${FELIS_VERSION_BOOTSTRAP} channel does not install; drop FELIS_VERSION_BOOTSTRAP"
! bootstrap_from_tui || die "FELIS_RELEASE does not reach felis setup's install, which installs the binary it runs as; run the installer one-liner with FELIS_RELEASE instead"
expect "a release tag is accepted""VALID""$(run_vr v1.2.3)"
for bad in 1.2.3 v1.2 main v1.2.3-rc1 'v1.2.3;id';do
expect "FELIS_RELEASE=$bad is refused""DIE: FELIS_RELEASE must be a release tag like v1.2.3 (got '$bad')""$(run_vr "$bad")"
done
expect "FELIS_RELEASE and FELIS_REF together are refused""DIE: FELIS_RELEASE and FELIS_REF both name what to install""$(FELIS_REF_PINNED=1 run_vr v1.2.3)"
expect "FELIS_RELEASE and FELIS_ARTIFACT_DIR together are refused""DIE: FELIS_RELEASE and FELIS_ARTIFACT_DIR both name what to install""$(FELIS_ARTIFACT_DIR=/srv/assets run_vr v1.2.3)"
expect "FELIS_RELEASE and FELIS_SKIP_FETCH together are refused""DIE: FELIS_RELEASE and FELIS_SKIP_FETCH both name what to install""$(FELIS_SKIP_FETCH=1 run_vr v1.2.3)"
expect "FELIS_RELEASE on the dev channel is refused""DIE: FELIS_RELEASE names a published release, which the dev channel does not install""$(FELIS_VERSION_BOOTSTRAP=dev run_vr v1.2.3)"
expect "FELIS_RELEASE under felis setup is refused""DIE: FELIS_RELEASE does not reach felis setup's install""$(FELIS_BOOTSTRAP_FROM_TUI=1 run_vr v1.2.3)"