Skip to content

Commit 5f87bf5

Browse files
committed
release: fix phpab command
1 parent 25719a7 commit 5f87bf5

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.github/workflows/release.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
run:
99
runs-on: ubuntu-latest
10-
name: Release
1110
steps:
1211
- name: Checkout
1312
uses: actions/checkout@v1
@@ -17,8 +16,8 @@ jobs:
1716
with:
1817
php-version: 7.4
1918
ini-values: assert.exception=1, phar.readonly=0, zend.assertions=1
20-
extensions: curl, json, phar, mbstring, uopz
21-
tools: pecl
19+
extensions: curl, json, phar, mbstring, gzip, bzip2, openssl
20+
tools: pecl, phing
2221
coverage: none
2322

2423
- name: Get Composer Cache Directory
@@ -36,10 +35,13 @@ jobs:
3635
run: composer validate
3736

3837
- name: Install dependencies
39-
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
38+
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
4039

4140
- name: Compile phar
42-
run: composer run-script phar
41+
run: phing phar
42+
43+
- name: Shasum builds
44+
run: sha256sum build/out/*
4345

4446
- name: Upload binary to release
4547
uses: svenstaro/upload-release-action@v1-release

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ atlassian-ide-plugin.xml
2222
/index.html
2323

2424
/coverage.xml
25+
/event.json

build.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project name="PHPDraft" default="setup">
33
<target name="setup" depends="clean"/>
4+
<property name="min-php-version" value="7.4.0"/>
45

56
<target name="clean" unless="clean.done" description="Cleanup build artifacts">
67
<delete dir="${project.basedir}/build/coverage"/>
@@ -136,7 +137,7 @@
136137
<arg value="--once"/>
137138
<arg value="--phar"/>
138139
<arg value="--hash"/>
139-
<arg value="SHA-1"/>
140+
<arg value="SHA-512"/>
140141
<arg value="--output"/>
141142
<arg path="${project.basedir}/build/out/phpdraft-library-${_version}.phar"/>
142143
<arg value="--template"/>
@@ -149,8 +150,11 @@
149150
<arg value="--nolower"/>
150151
<arg value="--static"/>
151152
<arg value="--phar"/>
153+
<arg value="--once"/>
154+
<arg value="--var"/>
155+
<arg value="PHPMINVER=${min-php-version}"/>
152156
<arg value="--hash"/>
153-
<arg value="SHA-1"/>
157+
<arg value="SHA-512"/>
154158
<arg value="--output"/>
155159
<arg path="${project.basedir}/build/out/phpdraft-${_version}.phar"/>
156160
<arg value="--template"/>

build/binary-phar-autoload.php.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env php
22
<?php
3-
if (version_compare('7.1.0', PHP_VERSION, '>')) {
3+
if (version_compare('___PHPMINVER___', PHP_VERSION, '>')) {
44
fwrite(
55
STDERR,
6-
'This version of PHPDraft requires PHP 7.1; using the latest version of PHP is highly recommended.' . PHP_EOL
6+
'This version of PHPDraft requires PHP ___PHPMINVER___; using the latest version of PHP is highly recommended.' . PHP_EOL
77
);
88

99
die(1);

composer.json

-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@
3737
"phpstan/phpstan": "^1.2.0",
3838
"phpstan/phpstan-phpunit": "^1.0.0"
3939
},
40-
"scripts": {
41-
"phar": [
42-
"vendor/bin/phing phar",
43-
"sha256sum build/out/*"
44-
]
45-
},
4640
"autoload": {
4741
"psr-4": { "PHPDraft\\": "src/PHPDraft" }
4842
},

0 commit comments

Comments
 (0)