Skip to content

Commit

Permalink
Merge branch '1.x-1.x' into issue-111-update-command
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkshire-pudding committed May 9, 2024
2 parents 4903ecc + fcd4349 commit 167ae18
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/backdrop/
/multisite/
/backdrop.zip
/box
/bee.phar
34 changes: 21 additions & 13 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: bee
recipe: backdrop
keys: false
config:
php: 8.2
webroot: backdrop
database: mysql
# Although Drush isn't needed/used, the version that Lando includes by default
# has a bug that causes all build steps to fail. We therefore need to update
# Drush to the latest version just to make sure that build steps run properly.
backdrush: 1.x-1.x
# Need to disable bee so can use the version in the repo.
bee: false
services:
appserver:
build:
# Remove existing symlink for `bee`
build_as_root:
# As bee is now added by default, we need to remove any existing versions
# of bee if you tested a versioned install of bee by adding in the config
# section above.
# Remove the parent folder if it exists.
- rm -rf /var/www/.bee
# Remove the symlink if it exists.
- rm -f /usr/local/bin/bee
build:
# Make symlink for `bee` pointing to this version.
- ln -s /app/bee.php /usr/local/bin/bee
# Download Backdrop.
- wget -q --show-progress -O /app/backdrop.zip https://github.com/backdrop/backdrop/archive/1.x.zip
# Download PHPUnit.
- wget -q --show-progress -O /app/phpunit https://phar.phpunit.de/phpunit-8.5.phar
- chmod +x /app/phpunit
# Download Box
- wget -q --show-progress -O /app/box "https://github.com/box-project/box/releases/download/4.4.0/box.phar"
- chmod +x /app/box
run:
# Run setup tasks.
- /app/.lando/setup.sh setup
Expand All @@ -30,17 +38,20 @@ events:
pre-rebuild:
# Run clean-up tasks.
- /app/.lando/setup.sh clean
# Remove `bee` symlink, Backdrop and PHPUnit.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit
# Remove `bee` symlink, Backdrop, PHPUnit, Box and any created bee.phar files.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit /app/box /app/bee.phar
pre-destroy:
# Run clean-up tasks.
- /app/.lando/setup.sh clean
# Remove `bee` symlink, Backdrop and PHPUnit.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit
# Remove `bee` symlink, Backdrop, PHPUnit, Box and any created bee.phar files.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit /app/box /app/bee.phar
tooling:
bee:
service: appserver
cmd: bee
box:
service: appserver
cmd: /app/box
reset:
service: appserver
cmd: /app/.lando/setup.sh
Expand All @@ -49,9 +60,6 @@ tooling:
cmd:
- cd /app/backdrop && /app/phpunit --testsuite backdrop --configuration /app/tests
- cd /app/multisite && /app/phpunit --testsuite multisite --configuration /app/tests
# check-code:
# service: appserver
# cmd: /app/b/vendor/bin/phpcs --standard=/app/b/vendor/backdrop/coder/coder_sniffer/Backdrop --ignore=vendor/* /app/b
proxy:
appserver:
- bee.lndo.site
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ and this project follows the

## [Unreleased]

### Added
- Configuration and tool (Box) to build Phar files
### Changed
- Updated Lando file to reflect Lando v3.21.0
### Fixed
- GitHub Action tests failing

### [1.x-1.0.1] - 2024-04-24

### Added
Expand Down
11 changes: 11 additions & 0 deletions box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"directories": [
"commands",
"includes"
],
"compactors": [
"KevinGH\\Box\\Compactor\\Php"
],
"git-version": "package_version",
"main": "bee.php"
}
2 changes: 1 addition & 1 deletion commands/status.bee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function status_bee_callback($arguments, $options) {
);
$rows[] = array(
array('value' => bt('Database port')),
array('value' => $info['port']),
array('value' => array_key_exists('port', $info) ? $info['port'] : NULL),
);

// States directly from database, as state_get() requires a higher
Expand Down

0 comments on commit 167ae18

Please sign in to comment.