Merge pull request #583 from chorrell/drop-minor

Use only major version for directory names
This commit is contained in:
Christopher Horrell 2017-11-08 19:47:15 -05:00 committed by GitHub
commit bf84a38aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 12 additions and 11 deletions

View File

@ -16,10 +16,10 @@ script:
env:
- DOCTOCCHECK: true
- NODE_VERSION: '4.*'
- NODE_VERSION: '6.*'
- NODE_VERSION: '8.*'
- NODE_VERSION: '9.*'
- NODE_VERSION: '4'
- NODE_VERSION: '6'
- NODE_VERSION: '8'
- NODE_VERSION: '9'
matrix:
include:

View File

@ -6,13 +6,13 @@ hash git 2>/dev/null || { echo >&2 "git not found, exiting."; }
# Used dynamically: print "$array_" $1
# shellcheck disable=SC2034
array_4_8='4 argon';
array_4='4 argon';
# shellcheck disable=SC2034
array_6_12='6 boron';
array_6='6 boron';
# shellcheck disable=SC2034
array_8_9='8 carbon';
array_8='8 carbon';
# shellcheck disable=SC2034
array_9_1='9 latest';
array_9='9 latest';
cd "$(cd "${0%/*}" && pwd -P)";
@ -47,11 +47,12 @@ for version in "${versions[@]}"; do
# Skip "docs" and other non-docker directories
[ -f "$version/Dockerfile" ] || continue
eval stub="$(echo "$version" | awk -F. '{ print "$array_" $1 "_" $2 }')";
eval stub="$(echo "$version" | awk -F. '{ print "$array_" $1 }')";
commit="$(fileCommit "$version")"
fullVersion="$(grep -m1 'ENV NODE_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
minorVersion="$(echo "$fullVersion" | cut -d'.' -f2)"
versionAliases=( $fullVersion $version ${stub} )
versionAliases=( $fullVersion $version.$minorVersion ${stub} )
# Get supported architectures for a specific version. See details in function.sh
supportedArches=( $(get_supported_arches "$version" "default") )

View File

@ -31,7 +31,7 @@ function update_node_version {
shift
fi
fullVersion="$(curl -sSL --compressed 'https://nodejs.org/dist' | grep '<a href="v'"$version." | sed -E 's!.*<a href="v([^"/]+)/?".*!\1!' | cut -f 3 -d . | sort -n | tail -1)"
fullVersion="$(curl -sSL --compressed 'https://nodejs.org/dist' | grep '<a href="v'"$version." | sed -E 's!.*<a href="v([^"/]+)/?".*!\1!' | cut -d'.' -f2,3| sort -n | tail -1)"
(
cp "$template" "$dockerfile"
local fromprefix=