forked from EvergreenCrypto/docker-finance
client: lib_docker: build: use 'experimental' path
This commit is contained in:
@@ -235,29 +235,40 @@ function lib_docker::__build()
|
||||
|
||||
if [[ "$global_platform" != "dev-tools" ]]; then
|
||||
|
||||
local _in_files=()
|
||||
local _files=()
|
||||
local _path="${global_repo_dockerfiles}/${global_platform}"
|
||||
|
||||
case "$global_arg_type" in
|
||||
default | slim | experimental)
|
||||
_in_files+=("hledger-flow.src")
|
||||
[[ "$global_arg_type" =~ ^default$|^experimental$ ]] && _in_files+=("root")
|
||||
[[ "$global_arg_type" =~ ^experimental$ ]] && _in_files+=("hledger.src")
|
||||
default)
|
||||
_files+=("${_path}/Dockerfile.hledger-flow.src.in")
|
||||
_files+=("${_path}/Dockerfile.root.in")
|
||||
;;
|
||||
tiny | micro)
|
||||
_in_files+=("hledger-flow.bin")
|
||||
[[ "$global_arg_type" == "tiny" ]] && _in_files+=("root")
|
||||
slim)
|
||||
_files+=("${_path}/Dockerfile.hledger-flow.src.in")
|
||||
;;
|
||||
tiny)
|
||||
_files+=("${_path}/Dockerfile.hledger-flow.bin.in")
|
||||
_files+=("${_path}/Dockerfile.root.in")
|
||||
;;
|
||||
micro)
|
||||
_files+=("${_path}/Dockerfile.hledger-flow.bin.in")
|
||||
;;
|
||||
experimental)
|
||||
_path+="/experimental"
|
||||
_files+=("${_path}/Dockerfile.hledger-flow.src.in")
|
||||
_files+=("${_path}/Dockerfile.hledger.src.in")
|
||||
_files+=("${_path}/Dockerfile.root.in")
|
||||
;;
|
||||
*)
|
||||
lib_utils::die_fatal "unsupported build"
|
||||
;;
|
||||
esac
|
||||
|
||||
for _file in "${_in_files[@]}"; do
|
||||
local _path="${global_repo_dockerfiles}/${global_platform}/Dockerfile.${_file}.in"
|
||||
lib_utils::print_debug "Appending '${_path}' to '${_final}'"
|
||||
for _file in "${_files[@]}"; do
|
||||
lib_utils::print_debug "Appending '${_file}' to '${_final}'"
|
||||
sed \
|
||||
-e "s:@DOCKER_FINANCE_USER@:${DOCKER_FINANCE_USER}:g" \
|
||||
"$_path" >>"$_final" || return $?
|
||||
"$_file" >>"$_final" || return $?
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user