mirror of https://github.com/ceph/go-ceph
entrypoint: handle adding build tags through a function
The previous code was somewhat dependent on always having the ceph version build tag set first. Change the code to use a function so that constructing the build tags is no longer order dependent and relocate the actual tag stetting if-statements to below the various function definitions. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
8835a26c9b
commit
b425523f44
|
@ -115,21 +115,14 @@ while true ; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "${CEPH_VERSION}" ]; then
|
add_build_tag() {
|
||||||
BUILD_TAGS="${CEPH_VERSION}"
|
local val="$1"
|
||||||
fi
|
if [ -n "$BUILD_TAGS" ]; then
|
||||||
|
BUILD_TAGS+=",${val}"
|
||||||
if [ -n "${USE_PTRGUARD}" ]; then
|
else
|
||||||
BUILD_TAGS+=",ptrguard"
|
BUILD_TAGS="${val}"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
if [ -z "${NO_PREVIEW}" ]; then
|
|
||||||
BUILD_TAGS+=",ceph_preview"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${BUILD_TAGS}" ]; then
|
|
||||||
BUILD_TAGS="-tags ${BUILD_TAGS}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
local ret
|
local ret
|
||||||
|
@ -297,6 +290,23 @@ pause_if_needed() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "${CEPH_VERSION}" ]; then
|
||||||
|
add_build_tag "${CEPH_VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${USE_PTRGUARD}" ]; then
|
||||||
|
add_build_tag "ptrguard"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${NO_PREVIEW}" ]; then
|
||||||
|
add_build_tag "ceph_preview"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${BUILD_TAGS}" ]; then
|
||||||
|
BUILD_TAGS="-tags ${BUILD_TAGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
test_go_ceph
|
test_go_ceph
|
||||||
pause_if_needed
|
pause_if_needed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue