Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1391: avoid files like dependencies.json are considered as version #1392

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* eol=lf
*.bat eol=crlf
*.png -text
*.jar binary
*.png binary
*.jpg binary
8 changes: 4 additions & 4 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1904,11 +1904,11 @@ function doGetAnyLatestSoftwareVersion() {
edition=$(doGetSoftwareEdition "${software}")
if [ -z "${prefix}" ]
then
version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV | head -1)"
version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV | head -1)"
else
prefix="${prefix:0:${#prefix}-2}" # 2 for "*!"
prefix="${prefix/./[.]}"
version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV | head -1)"
version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV | head -1)"
fi
echo "${version}"
}
Expand All @@ -1926,14 +1926,14 @@ function doGetLatestSoftwareVersion() {
versions=()
while IFS= read -r line; do
versions+=("${line}")
done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV)
done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV)
else
prefix="${prefix:0:${#prefix}-1}" # 1 for "*"
prefix="${prefix/./[.]}"
versions=()
while IFS= read -r line; do
versions+=("${line}")
done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV)
done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV)
fi

# version is not considered stable (see IDEasy VersionSegment) if:
Expand Down
Loading