build-phar.sh 322 B

12345678910111213
  1. #! /usr/bin/env bash
  2. # Remove dev deps to reduce phar size
  3. rm -rf composer.lock vendor/
  4. # Generate composer.lock
  5. composer install --no-dev
  6. # Find SDK version
  7. version=$(grep 'const OSS_VERSION' src/OSS/OssClient.php | grep -oE '[0-9.]+')
  8. # Build phar
  9. phar-composer build . aliyun-oss-php-sdk-$version.phar