mirror of
https://github.com/nodejs/docker-node.git
synced 2025-04-18 17:04:01 +03:00
fix: correct update script to support version argument again
This commit is contained in:
parent
ebd48c9005
commit
2d3b74e182
@ -137,12 +137,16 @@ function get_config() {
|
||||
#
|
||||
# The result is a list of valid versions.
|
||||
function get_versions() {
|
||||
shift
|
||||
|
||||
local versions=()
|
||||
local dirs=()
|
||||
local dirs=("$@")
|
||||
|
||||
local default_variant
|
||||
default_variant=$(get_config "./" "default_variant")
|
||||
IFS=' ' read -ra dirs <<< "$(echo "./"*/)"
|
||||
if [ ${#dirs[@]} -eq 0 ]; then
|
||||
IFS=' ' read -ra dirs <<< "$(echo "./"*/)"
|
||||
fi
|
||||
|
||||
for dir in "${dirs[@]}"; do
|
||||
if [ -a "${dir}/Dockerfile" ] || [ -a "${dir}/${default_variant}/Dockerfile" ]; then
|
||||
|
@ -189,6 +189,8 @@ function update_node_version() {
|
||||
)
|
||||
}
|
||||
|
||||
pids=()
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
parentpath=$(dirname "${version}")
|
||||
versionnum=$(basename "${version}")
|
||||
@ -201,8 +203,6 @@ for version in "${versions[@]}"; do
|
||||
# See details in function.sh
|
||||
IFS=' ' read -ra variants <<< "$(get_variants "${parentpath}")"
|
||||
|
||||
pids=()
|
||||
|
||||
if [ -f "${version}/Dockerfile" ]; then
|
||||
if [ "${update_version}" -eq 0 ]; then
|
||||
update_node_version "${baseuri}" "${versionnum}" "${parentpath}/Dockerfile.template" "${version}/Dockerfile" &
|
||||
|
Loading…
x
Reference in New Issue
Block a user