From 5f87bf59e49d3d03de974785cdbfd63b3f9316a9 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Thu, 27 Jan 2022 16:27:33 +0100 Subject: [PATCH] release: fix phpab command --- .github/workflows/release.yml | 12 +++++++----- .gitignore | 1 + build.xml | 8 ++++++-- build/binary-phar-autoload.php.in | 4 ++-- composer.json | 6 ------ 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 245ae210..2e8e92e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,6 @@ on: jobs: run: runs-on: ubuntu-latest - name: Release steps: - name: Checkout uses: actions/checkout@v1 @@ -17,8 +16,8 @@ jobs: with: php-version: 7.4 ini-values: assert.exception=1, phar.readonly=0, zend.assertions=1 - extensions: curl, json, phar, mbstring, uopz - tools: pecl + extensions: curl, json, phar, mbstring, gzip, bzip2, openssl + tools: pecl, phing coverage: none - name: Get Composer Cache Directory @@ -36,10 +35,13 @@ jobs: run: composer validate - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs + run: composer install --prefer-dist --no-progress --ignore-platform-reqs - name: Compile phar - run: composer run-script phar + run: phing phar + + - name: Shasum builds + run: sha256sum build/out/* - name: Upload binary to release uses: svenstaro/upload-release-action@v1-release diff --git a/.gitignore b/.gitignore index 6e0d9638..7f2e1c1f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ atlassian-ide-plugin.xml /index.html /coverage.xml +/event.json diff --git a/build.xml b/build.xml index 3c78eb99..2f3c90a9 100644 --- a/build.xml +++ b/build.xml @@ -1,6 +1,7 @@ + @@ -136,7 +137,7 @@ - + @@ -149,8 +150,11 @@ + + + - + diff --git a/build/binary-phar-autoload.php.in b/build/binary-phar-autoload.php.in index 1f82c926..01f4803f 100755 --- a/build/binary-phar-autoload.php.in +++ b/build/binary-phar-autoload.php.in @@ -1,9 +1,9 @@ #!/usr/bin/env php ')) { +if (version_compare('___PHPMINVER___', PHP_VERSION, '>')) { fwrite( STDERR, - 'This version of PHPDraft requires PHP 7.1; using the latest version of PHP is highly recommended.' . PHP_EOL + 'This version of PHPDraft requires PHP ___PHPMINVER___; using the latest version of PHP is highly recommended.' . PHP_EOL ); die(1); diff --git a/composer.json b/composer.json index 92442ed8..4e0a472a 100644 --- a/composer.json +++ b/composer.json @@ -37,12 +37,6 @@ "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-phpunit": "^1.0.0" }, - "scripts": { - "phar": [ - "vendor/bin/phing phar", - "sha256sum build/out/*" - ] - }, "autoload": { "psr-4": { "PHPDraft\\": "src/PHPDraft" } },