diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-04-21 19:26:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 19:26:57 +0200 |
commit | d9af7c2f1137b9fb0500ee6809e82156d12ab2dd (patch) | |
tree | 75675c3a101b3e1be0a4e4a01afdd4afd44f799a /build | |
parent | 0ac7230b7f46c5bb3bca78aaf5dcec158e429ec6 (diff) | |
parent | cca3b9495c601e373e923e9b6a703d034cc5b496 (diff) | |
download | nextcloud-server-d9af7c2f1137b9fb0500ee6809e82156d12ab2dd.tar.gz nextcloud-server-d9af7c2f1137b9fb0500ee6809e82156d12ab2dd.zip |
Merge pull request #37867 from nextcloud/techdebt/noid/require-min-composer-version-for-autoloader
chore(autoloader): Require a minimum composer version to make sure the autoloader
Diffstat (limited to 'build')
-rwxr-xr-x | build/autoloaderchecker.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build/autoloaderchecker.sh b/build/autoloaderchecker.sh index 19ae6a71731..da3a7ef2546 100755 --- a/build/autoloaderchecker.sh +++ b/build/autoloaderchecker.sh @@ -14,6 +14,16 @@ else fi +COMPOSER_VERSION=$($COMPOSER_COMMAND --version | cut -d" " -f3) +COMPOSER_MAJOR_VERSION=$(echo "$COMPOSER_VERSION" | cut -d"." -f1) +COMPOSER_MINOR_VERSION=$(echo "$COMPOSER_VERSION" | cut -d"." -f2) +COMPOSER_PATCH_VERSION=$(echo "$COMPOSER_VERSION" | cut -d"." -f3) + +if ! [ "$COMPOSER_MAJOR_VERSION" -gt 2 -o \( "$COMPOSER_MAJOR_VERSION" -eq 2 -a "$COMPOSER_MINOR_VERSION" -ge 6 \) -o \( "$COMPOSER_MAJOR_VERSION" -eq 2 -a "$COMPOSER_MINOR_VERSION" -eq 5 -a "$COMPOSER_PATCH_VERSION" -ge 5 \) ]; then + echo "composer version >= 2.5.5 required. Version found: $COMPOSER_VERSION" >&2 + exit 1 +fi + REPODIR=`git rev-parse --show-toplevel` #Redump the main autoloader |