1
0
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:
Simen Bekkhus 2024-10-22 09:18:08 +02:00
parent ebd48c9005
commit 2d3b74e182
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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" &