client: lib_docker: add 'experimental' build type

This commit is contained in:
2024-07-09 19:54:23 -07:00
parent c74a76bd0b
commit 48a7b7f798

View File

@@ -122,7 +122,7 @@ function lib_docker::__parse_args_build()
Build type: Build type:
type${global_arg_delim_2}<default|slim|tiny|micro> type${global_arg_delim_2}<default|slim|tiny|micro|experimental>
\e[32mNotes:\e[0m \e[32mNotes:\e[0m
@@ -131,17 +131,20 @@ function lib_docker::__parse_args_build()
\e[32mExamples:\e[0m \e[32mExamples:\e[0m
\e[37;2m# Build normal (default) image\e[0m \e[37;2m# Build normal 'default' image\e[0m
$ $global_usage type${global_arg_delim_2}default $ $global_usage type${global_arg_delim_2}default
\e[37;2m# Build a smaller default image but *without* ROOT.cern (meta-analysis) support\e[0m \e[37;2m# Build a smaller 'default' image but *without* ROOT.cern (meta-analysis) support\e[0m
$ $global_usage type${global_arg_delim_2}slim $ $global_usage type${global_arg_delim_2}slim
\e[37;2m# Build an even smaller default image with *pre-built* hledger-flow binary (but *with* ROOT.cern support)\e[0m \e[37;2m# Build an even smaller 'default' image with *pre-built* hledger-flow binary (but *with* ROOT.cern support)\e[0m
$ $global_usage type${global_arg_delim_2}tiny $ $global_usage type${global_arg_delim_2}tiny
\e[37;2m# Build the smallest image possible: the 'tiny' image *without* ROOT.cern support\e[0m \e[37;2m# Build the smallest image possible: the 'tiny' image *without* ROOT.cern support\e[0m
$ $global_usage type${global_arg_delim_2}micro $ $global_usage type${global_arg_delim_2}micro
\e[37;2m# Build experimental image based on 'default' image (WARNING: large image and possibly unstable)\e[0m
$ $global_usage type${global_arg_delim_2}experimental
" "
;; ;;
dev-tools) dev-tools)
@@ -198,7 +201,7 @@ function lib_docker::__parse_args_build()
# Arg: type # Arg: type
if [ ! -z "$_arg_type" ]; then if [ ! -z "$_arg_type" ]; then
[[ ! "$_arg_type" =~ ^default$|^slim$|^tiny$|^micro$ ]] \ [[ ! "$_arg_type" =~ ^default$|^slim$|^tiny$|^micro$|^experimental$ ]] \
&& lib_utils::die_usage "$_usage" && lib_utils::die_usage "$_usage"
declare -gr global_arg_type="$_arg_type" declare -gr global_arg_type="$_arg_type"
@@ -243,9 +246,10 @@ function lib_docker::__build()
local _in_files=() local _in_files=()
case "$global_arg_type" in case "$global_arg_type" in
default | slim) default | slim | experimental)
_in_files+=("hledger-flow.src") _in_files+=("hledger-flow.src")
[[ "$global_arg_type" == "default" ]] && _in_files+=("root") [[ "$global_arg_type" =~ ^default$|^experimental$ ]] && _in_files+=("root")
[[ "$global_arg_type" =~ ^experimental$ ]] && _in_files+=("hledger.src")
;; ;;
tiny | micro) tiny | micro)
_in_files+=("hledger-flow.bin") _in_files+=("hledger-flow.bin")