Skip to content

Commit

Permalink
CI: move humbug/box out of dev-tools/composer.json (#7472)
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Nov 26, 2023
1 parent 9ae580f commit d50d5b6
Show file tree
Hide file tree
Showing 4 changed files with 970 additions and 3,231 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ jobs:
os: ${{ runner.os }}
php: ${{ matrix.php-version }}

- name: Cache dev-tools
uses: actions/cache@v3
with:
path: dev-tools/bin/
key: Build-${{ hashFiles('dev-tools/build.sh') }}

- name: Build phar
run: ./dev-tools/build.sh

Expand Down
10 changes: 8 additions & 2 deletions dev-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ composer config platform.php 7.4
composer update --optimize-autoloader --no-interaction --no-progress --no-scripts --no-dev
composer info -D | sort

composer show -d dev-tools humbug/box -q || composer update -d dev-tools --no-interaction --no-progress
# install box/phar
mkdir -p dev-tools/bin
if [ ! -x dev-tools/bin/box ]; then
wget -O dev-tools/bin/box "https://github.com/box-project/box/releases/download/4.1.0/box.phar"
chmod +x dev-tools/bin/box
fi
dev-tools/bin/box --version

# build phar file
dev-tools/vendor/bin/box compile
dev-tools/bin/box compile

# revert changes to composer
git checkout composer.json
Expand Down
1 change: 0 additions & 1 deletion dev-tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"require": {
"php": "^8.2",
"ergebnis/composer-normalize": "^2.39.0",
"humbug/box": "4.1.0",
"jangregor/phpstan-prophecy": "^1.0.0",
"maglnet/composer-require-checker": "^4.7.1",
"mi-schi/phpmd-extension": "^4.3.0",
Expand Down

0 comments on commit d50d5b6

Please sign in to comment.