Skip to content
Open
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
30 changes: 20 additions & 10 deletions qompoter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1315,10 +1315,20 @@ isGitRepositories()
getBestVersionNumber()
{
local versionPattern=$1
if [ "${IS_STABLE_ONLY}" == "1" ]; then
grep "v\?${versionPattern}\$" | grep -v -e "-\(alpha\|beta\|RC[0-9]*\|[0-9]*\)$" | tail -1
# Remove * since grep will aready handle it
if [ "${versionPattern: -1}" == "*" ]; then
versionPattern=${versionPattern:: -1}
fi
# Insert "\" character before "." character to have the correct regex expression
versionPattern=$(echo "${versionPattern}" | sed 's/\./\\\./g')
if [ "${IS_STABLE_ONLY}" == "1" ] && [ "${versionPattern: -4}" == "-lib" ]; then
grep -- '-lib$' | grep "v\?${versionPattern:: -4}" | grep -v -e "-\(alpha\|beta\|RC[0-9]*\|[0-9]*\)$" | tail -1
elif [ "${IS_STABLE_ONLY}" == "1" ]; then
grep "v\?${versionPattern}" | grep -v -e "-\(alpha\|beta\|RC[0-9]*\|[0-9]*\)$" | tail -1
elif [ "${versionPattern: -4}" == "-lib" ]; then
grep -- '-lib$' | grep "v\?${versionPattern:: -4}" | grep -v -e "-\(alpha\|beta\|RC[0-9]*\|[0-9]*\)$" | tail -1
else
grep "v\?${versionPattern}\$" | tail -1
grep "v\?${versionPattern}" | tail -1
fi
}

Expand Down Expand Up @@ -2275,7 +2285,7 @@ inspectTreeAction()
if [ -f qompoter.json ]; then
if [ -z "$(grep -w -o ""\"require\""" qompoter.json)" ] && [ -z "$(grep -w -o ""\"require-dev\""" qompoter.json)" ] && [ -z "$(grep -w -o ""\"require-global\""" qompoter.json)" ]; then
echo -e "\e[37m|\t|---- There is no dependencies in the qompoter.json of this project"
else
else
listRequirement ""\"require\"""
listRequirement ""\"require-dev\"""
listRequirement ""\"require-global\"""
Expand Down Expand Up @@ -2327,7 +2337,7 @@ updateAction()
checkQompoterFile "${qompoterFile}" || return 100
prepareVendorDir "${vendorDir}"
prepareQompoterLock "${qompoterLockFile}.tmp" "$(getProjectFullName "${qompoterFile}")"

recursiveInstallFromQompoterFile "${qompoterFile}" "${qompoterLockFile}.tmp" "${vendorDir}"
globalRes=$?

Expand Down Expand Up @@ -2572,8 +2582,8 @@ usage()

Other actions are useful for digging into Qompoter:
inqlude, jsonh, md5sum
For more details, use: $C_PROGNAME --help

For more details, use: $C_PROGNAME --help
EOF
}

Expand Down Expand Up @@ -2698,11 +2708,11 @@ help()

List all dependencies for this project (i.e. show lock file):
$C_PROGNAME inspect --all
Make a tree with all dependencies and sub-dependencies for this project (i.e. show

Make a tree with all dependencies and sub-dependencies for this project (i.e. show
lock file as a tree):
$C_PROGNAME inspect --tree

Export vendor directory:
$C_PROGNAME export

Expand Down