forked from EvergreenCrypto/docker-finance
client: lib_docker: add 'experimental' build type
This commit is contained in:
@@ -122,7 +122,7 @@ function lib_docker::__parse_args_build()
|
||||
|
||||
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
|
||||
|
||||
@@ -131,17 +131,20 @@ function lib_docker::__parse_args_build()
|
||||
|
||||
\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
|
||||
|
||||
\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
|
||||
|
||||
\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
|
||||
|
||||
\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
|
||||
|
||||
\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)
|
||||
@@ -198,7 +201,7 @@ function lib_docker::__parse_args_build()
|
||||
|
||||
# Arg: type
|
||||
if [ ! -z "$_arg_type" ]; then
|
||||
[[ ! "$_arg_type" =~ ^default$|^slim$|^tiny$|^micro$ ]] \
|
||||
[[ ! "$_arg_type" =~ ^default$|^slim$|^tiny$|^micro$|^experimental$ ]] \
|
||||
&& lib_utils::die_usage "$_usage"
|
||||
|
||||
declare -gr global_arg_type="$_arg_type"
|
||||
@@ -243,9 +246,10 @@ function lib_docker::__build()
|
||||
local _in_files=()
|
||||
|
||||
case "$global_arg_type" in
|
||||
default | slim)
|
||||
default | slim | experimental)
|
||||
_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)
|
||||
_in_files+=("hledger-flow.bin")
|
||||
|
||||
Reference in New Issue
Block a user