Skip to content

Commit

Permalink
Use box to create phar archive
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Di Rocco committed Sep 6, 2020
1 parent ab4d392 commit cc9e800
Show file tree
Hide file tree
Showing 18 changed files with 717 additions and 321 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
- name: Run test suite
run: vendor/bin/phpunit --coverage-text
- name: Create phar archive
run: php -d phar.readonly=0 bin/compile
run: |
wget https://github.com/box-project/box/releases/download/3.8.5/box.phar
mkdir -p build
php -d phar.readonly=0 box.phar compile
- uses: actions/upload-artifact@master
if: startsWith(github.ref, 'refs/tags/')
with:
name: soap_client.phar
path: soap_client.phar
path: build/soap_client.phar
release:
runs-on: ubuntu-latest
needs: build
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/soap_client.phar

/vendor/
/build
/.php_cs.cache
/build
/vendor/
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: clean
build: clean
bin/compile
chmod +x soap_client.phar
mkdir -p build
box compile


.PHONY: clean
Expand All @@ -16,17 +16,11 @@ test: clean
vendor/bin/phpunit


.PHONY: phpmd
phpmd:
vendor/bin/phpmd src text codesize,unusedcode,naming,design; [ $$? -eq 2 ] && true


.PHONY: coverage
coverage: clean
vendor/bin/phpunit --coverage-text


# Install the binary into /usr/local/bin
.PHONY: install
install:
mkdir -p /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the `help`:

This will output something like:

php-soap-client version 3.0.1
php-soap-client version 3.0.3

Usage:
[options] command [arguments]
Expand Down
74 changes: 0 additions & 74 deletions bin/compile

This file was deleted.

8 changes: 8 additions & 0 deletions box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"output": "build/soap_client.phar",
"algorithm": "SHA512",
"force-autodiscovery": true,
"directories": [
"config"
]
}
Loading

0 comments on commit cc9e800

Please sign in to comment.