Skip to content

Commit

Permalink
release: fix phpab command
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Jan 27, 2022
1 parent 25719a7 commit 5f87bf5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
run:
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ atlassian-ide-plugin.xml
/index.html

/coverage.xml
/event.json
8 changes: 6 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="PHPDraft" default="setup">
<target name="setup" depends="clean"/>
<property name="min-php-version" value="7.4.0"/>

<target name="clean" unless="clean.done" description="Cleanup build artifacts">
<delete dir="${project.basedir}/build/coverage"/>
Expand Down Expand Up @@ -136,7 +137,7 @@
<arg value="--once"/>
<arg value="--phar"/>
<arg value="--hash"/>
<arg value="SHA-1"/>
<arg value="SHA-512"/>
<arg value="--output"/>
<arg path="${project.basedir}/build/out/phpdraft-library-${_version}.phar"/>
<arg value="--template"/>
Expand All @@ -149,8 +150,11 @@
<arg value="--nolower"/>
<arg value="--static"/>
<arg value="--phar"/>
<arg value="--once"/>
<arg value="--var"/>
<arg value="PHPMINVER=${min-php-version}"/>
<arg value="--hash"/>
<arg value="SHA-1"/>
<arg value="SHA-512"/>
<arg value="--output"/>
<arg path="${project.basedir}/build/out/phpdraft-${_version}.phar"/>
<arg value="--template"/>
Expand Down
4 changes: 2 additions & 2 deletions build/binary-phar-autoload.php.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env php
<?php
if (version_compare('7.1.0', PHP_VERSION, '>')) {
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);
Expand Down
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
},
Expand Down

0 comments on commit 5f87bf5

Please sign in to comment.