Skip to content

Commit 52db5a2

Browse files
Update build process by modifying composer.json and GitHub Actions to install Box and configure it, while also updating .gitignore to include new files.
1 parent d3ce76b commit 52db5a2

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/phar-build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ jobs:
2929

3030
- name: Install Box
3131
run: |
32-
wget -O phive.phar "https://phar.io/releases/phive.phar"
33-
php phive.phar install humbug/box --copy tools/box
32+
mkdir -p tools
33+
curl -Ls https://github.com/box-project/box/releases/download/4.6.6/box.phar -o tools/box
34+
chmod +x tools/box
35+
36+
- name: Configure Box
37+
run: cp box.json.dist box.json
3438

3539
- name: Build PHAR
3640
run: tools/box compile

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
/bc-check.phar
77
/coverage/
88
/bin/
9-
phive.phar
9+
phive.phar
10+
/tools/
11+
/box.json

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
"cs-check": "php-cs-fixer fix --dry-run --diff",
3636
"cs-fix": "php-cs-fixer fix",
3737
"qa": ["@phpstan", "@cs-check", "@test"],
38-
"build-phar": "tools/box compile"
38+
"build-phar": [
39+
"if [ ! -f tools/box ]; then curl -Ls https://github.com/box-project/box/releases/download/4.6.6/box.phar -o tools/box && chmod +x tools/box; fi",
40+
"if [ ! -f box.json ]; then cp box.json.dist box.json; fi",
41+
"tools/box compile"
42+
]
3943
},
4044
"bin": ["bin/bc-check"],
4145
"config": {

0 commit comments

Comments
 (0)