]> BookStack Code Mirror - system-cli/log
system-cli
3 months agoDownloadVendorCommand: Added check for ZIP file access 21/head
Dan Brown [Tue, 11 Mar 2025 23:42:54 +0000 (23:42 +0000)]
DownloadVendorCommand: Added check for ZIP file access

3 months agoAltered mysql config passing, fixed some test issues
Dan Brown [Tue, 11 Mar 2025 16:53:32 +0000 (16:53 +0000)]
Altered mysql config passing, fixed some test issues

Switched mysql config file use to be an extra file, so that existing
system config files can be considered instead of being ignored.

Does mean that user config files could take precedance, but hopefully
that should not be a big concern.

3 months agoBumped version and updated readme command list
Dan Brown [Tue, 11 Mar 2025 15:51:17 +0000 (15:51 +0000)]
Bumped version and updated readme command list

3 months agoAdded test coverage for DownloadVendorCommand
Dan Brown [Tue, 11 Mar 2025 14:31:32 +0000 (14:31 +0000)]
Added test coverage for DownloadVendorCommand

3 months agoAdded DownloadVendorCommand
Dan Brown [Mon, 10 Mar 2025 21:23:22 +0000 (21:23 +0000)]
Added DownloadVendorCommand

3 months agoAdded some CLI change handling to prevent errors
Dan Brown [Sun, 9 Mar 2025 16:00:51 +0000 (16:00 +0000)]
Added some CLI change handling to prevent errors

Added proper detection of CLI changes, with early quite and output to
tell user to re-run, instead of erroring with a stack trace.
Used in scenario where the CLI will change itself as part of BookStack
updates.

Toyed with the idea of pre-compiling CLI PHP files, or handling the
scenario to switch to the new CLI version, but those are a lot more
complex and potentially error prone.

3 months agoRange of changes to MySQL execution
Dan Brown [Sat, 8 Mar 2025 17:19:58 +0000 (17:19 +0000)]
Range of changes to MySQL execution

- Changes mysql usage to use options files, removes used of env options
  used for password.
- Updated to use mariadb specific programs if existing, otherwise mysql.
- Adds common xampp bin path for searching for mysql.

3 months agoUpdated docker setup
Dan Brown [Sat, 8 Mar 2025 17:16:35 +0000 (17:16 +0000)]
Updated docker setup

Updated image and PHP packages so that it works with current versions of
BookStack.
Removed deprecated version from compose.

3 months agoUpdated dependancies, license year and .github folder
Dan Brown [Sat, 8 Mar 2025 14:53:43 +0000 (14:53 +0000)]
Updated dependancies, license year and .github folder

7 months agoUpdated app name, and added CLI version indicator
Dan Brown [Thu, 7 Nov 2024 17:06:26 +0000 (17:06 +0000)]
Updated app name, and added CLI version indicator

7 months agoAdded path check/validation for provided restore file path
Dan Brown [Thu, 7 Nov 2024 16:59:44 +0000 (16:59 +0000)]
Added path check/validation for provided restore file path

Closes #17

7 months agoRemoved stray debug line
Dan Brown [Thu, 7 Nov 2024 16:26:57 +0000 (16:26 +0000)]
Removed stray debug line

Closes #11

7 months agoFixed cwd warning during tests
Dan Brown [Thu, 7 Nov 2024 16:20:10 +0000 (16:20 +0000)]
Fixed cwd warning during tests

A warning was shown due to the cwd being changed into a location which
was then later deleted. This resets the cwd before running the deletion.

7 months agoUpdated dependancies, increased min. PHP version
Dan Brown [Thu, 7 Nov 2024 16:01:52 +0000 (16:01 +0000)]
Updated dependancies, increased min. PHP version

- Updated test files as required.
- Fixed deprecated use of opening ZIP on empty file.

2 years agoAddressed further symlink issues
Dan Brown [Mon, 22 May 2023 09:20:38 +0000 (10:20 +0100)]
Addressed further symlink issues

Specifically updating recursive deletion/copy handling to ignore symlink
directories. This is so symlinks remain so that content is stored in the
actual desired symlinked locations upon restore, rather than new
non-sym-link equivilents (Which could loose data in scenarios like
within docker containers where data is symlinked to volume locations).

Tested on a dev linuxserver docker environment, which specific checking
of file handling before/after restore of backup.

2 years agoUpdated PHP deps
Dan Brown [Mon, 22 May 2023 08:06:04 +0000 (09:06 +0100)]
Updated PHP deps

2 years agoImproved symlink support for backup/restore
Dan Brown [Mon, 22 May 2023 08:03:59 +0000 (09:03 +0100)]
Improved symlink support for backup/restore

Updates filesystem iteration to specifically handle symlinks when
iterating through files, and uses the file's real path when fetching
their contents.
Fixes #10
Adds test to cover backup case.

2 years agoFixed script-relative app locator when running as phar
Dan Brown [Mon, 22 May 2023 07:30:44 +0000 (08:30 +0100)]
Fixed script-relative app locator when running as phar

Was previously doubling up on the dirname usage leading the locator to
look at the parent dir when running as a phar, likely due to the CLI
being previously nested in an app dir.
Fixes #9

2 years agoAddressed restore issues
Dan Brown [Sun, 7 May 2023 12:26:44 +0000 (13:26 +0100)]
Addressed restore issues

- Actually added force option to update-url artisan command, after missed
  in last commit.
- Fixed lack of updating APP_URL in .env due to bad preg_replace.
- Added new test to cover different case of using the backup env URL.
- Updated existing test with correct expectations.

2 years agoUpdated backup test to use backups path now in release
Dan Brown [Sun, 7 May 2023 12:26:06 +0000 (13:26 +0100)]
Updated backup test to use backups path now in release

2 years agoFixed update-url command not ran, Fixed wrong env contents
Dan Brown [Sun, 7 May 2023 11:27:46 +0000 (12:27 +0100)]
Fixed update-url command not ran, Fixed wrong env contents

- Adds --force command to the update-url run so that it's actually ran
  during a restore. Option recently added on BookStack side to support.
- Updates env handling so that the old env contents are actually used as
  part of the merge. Updated existing test to cover.

Fixes #7, Fixes #8

2 years agoRemoved old imports
Dan Brown [Sat, 6 May 2023 15:03:58 +0000 (16:03 +0100)]
Removed old imports

2 years agoUpdated move to be a recursive copy+delete
Dan Brown [Sat, 6 May 2023 15:01:24 +0000 (16:01 +0100)]
Updated move to be a recursive copy+delete

Added via new Directory helper class, which the existing recursive
delete function has been added to.
Done since rename would not work across filesystem boundaries.
Tested via a linuxserver BS setup.

Closes #6

2 years agoAdded support for key restore files/folders being symlinks
Dan Brown [Sat, 6 May 2023 13:52:43 +0000 (14:52 +0100)]
Added support for key restore files/folders being symlinks

Fixes #4
Added test to cover.

2 years agoAdded check and warning for updating non-git-managed instances
Dan Brown [Sat, 6 May 2023 10:31:20 +0000 (11:31 +0100)]
Added check and warning for updating non-git-managed instances

Closes #5
Added test to cover.

2 years agoAdded general warning on all app usage about alpha status
Dan Brown [Wed, 3 May 2023 09:45:45 +0000 (10:45 +0100)]
Added general warning on all app usage about alpha status

- Also upped more timeouts.
- Added extra advisory text for restore regarding permissions.

2 years agoAdded improvements from testing on bsdemo
Dan Brown [Mon, 1 May 2023 15:02:32 +0000 (16:02 +0100)]
Added improvements from testing on bsdemo

- Updated default info text to be cyan instead of blue for readability.
- Added "ZIP" in backup command details to make the file type clear.
- Updated some really low MySQL timeouts.

2 years agoAdded warning to complile when dev deps are installed
Dan Brown [Sat, 29 Apr 2023 13:13:20 +0000 (14:13 +0100)]
Added warning to complile when dev deps are installed

2 years agoMade changes based upon freebsd/openbsd testing
Dan Brown [Sat, 29 Apr 2023 13:02:00 +0000 (14:02 +0100)]
Made changes based upon freebsd/openbsd testing

- Added better generally output formatting with warnings and blue info.
- Addressed deprecation warning when opening empty zip from temp file.
- Updated mysqldump so warnings did not stop dump, but are shown to
  users.
- Massively increased timeouts where needed.
- Fixed a few typos.
- Logged extra mysql known issues.
- Added protocol to mysql commands since that's what's expected in
  BookStack's usage.
- Updated required extensions list to be more comprehensive, based upon
  actual need on FreeBSD (Where php defaults were minimal) and extracted
  requirements to static class vars for easier editing.

2 years agoFixed pathing issue in test
Dan Brown [Fri, 28 Apr 2023 18:16:46 +0000 (19:16 +0100)]
Fixed pathing issue in test

2 years agoFixed additional backup path issue
Dan Brown [Fri, 28 Apr 2023 18:11:09 +0000 (19:11 +0100)]
Fixed additional backup path issue

Also added extra message output before zip->close otherwise it would
look like theme backups could take a while.

2 years agoMade a range of tweaks from testing
Dan Brown [Fri, 28 Apr 2023 17:36:40 +0000 (18:36 +0100)]
Made a range of tweaks from testing

- Fixed some relative paths issues when ran in phar.
- Added helper class for doing path work.
- Updated composer runner timeout.
- Updated checks for paths more thorough.
- Removed default completion command.

2 years agoDeveloped out restore command testing
Dan Brown [Thu, 6 Apr 2023 11:20:38 +0000 (12:20 +0100)]
Developed out restore command testing

2 years agoAdded main-path restore command testing
Dan Brown [Wed, 5 Apr 2023 20:07:33 +0000 (21:07 +0100)]
Added main-path restore command testing

Addressed some issues in the process including:
- Added dropping of existing db tables before restore.
- Changed how passwords are used in MySQL CLI actions to prevent
  warnings.
- Updated docker setup for proper healthcheck/cleanup actions since was
  previously misled by existing running container instances.

2 years agoCovered backup command options with testing
Dan Brown [Tue, 4 Apr 2023 15:10:50 +0000 (16:10 +0100)]
Covered backup command options with testing

2 years agoStarted testing of backup command
Dan Brown [Mon, 3 Apr 2023 16:26:09 +0000 (17:26 +0100)]
Started testing of backup command

Came across a couple of issues during build:
1. DB needed init SQL query to fix user permissions to allow backup,
   added detail to readme in new "known issues".
2. App container work needed to wait for database to be alive.

2 years agoAdded testing for the update command
Dan Brown [Mon, 3 Apr 2023 15:16:38 +0000 (16:16 +0100)]
Added testing for the update command

2 years agoDeveloped base testing and environment further
Dan Brown [Mon, 3 Apr 2023 14:46:01 +0000 (15:46 +0100)]
Developed base testing and environment further

2 years agoAdded a docker environment for stable dev
Dan Brown [Tue, 28 Mar 2023 15:00:34 +0000 (16:00 +0100)]
Added a docker environment for stable dev

2 years agoAdded strict types, started phpunit testing
Dan Brown [Mon, 27 Mar 2023 18:43:19 +0000 (19:43 +0100)]
Added strict types, started phpunit testing

2 years agoAdded readme and some other meta files
Dan Brown [Thu, 9 Mar 2023 15:58:44 +0000 (15:58 +0000)]
Added readme and some other meta files

2 years agoRestructured repo to work as it's own project
Dan Brown [Thu, 9 Mar 2023 15:41:18 +0000 (15:41 +0000)]
Restructured repo to work as it's own project

2 years agoGot restore command to a working state
Dan Brown [Thu, 9 Mar 2023 14:42:28 +0000 (14:42 +0000)]
Got restore command to a working state

2 years agoProgressed restore command to almost working state
Dan Brown [Tue, 7 Mar 2023 18:10:44 +0000 (18:10 +0000)]
Progressed restore command to almost working state

2 years agoProgressed restore command a little
Dan Brown [Tue, 7 Mar 2023 12:05:04 +0000 (12:05 +0000)]
Progressed restore command a little

2 years agoStarted restore command, extracted artisan command
Dan Brown [Mon, 6 Mar 2023 21:39:22 +0000 (21:39 +0000)]
Started restore command, extracted artisan command

2 years agoAdded central way to resolve app path, improved ouput formatting
Dan Brown [Mon, 6 Mar 2023 17:35:23 +0000 (17:35 +0000)]
Added central way to resolve app path, improved ouput formatting

2 years agoAdded update command
Dan Brown [Mon, 6 Mar 2023 14:55:41 +0000 (14:55 +0000)]
Added update command

Extracted some common parts to their own service files

2 years agoMigrated to symfony/console
Dan Brown [Sun, 5 Mar 2023 15:28:02 +0000 (15:28 +0000)]
Migrated to symfony/console

2 years agoAdded dep check and composer auto-install to init command
Dan Brown [Sat, 4 Mar 2023 19:23:44 +0000 (19:23 +0000)]
Added dep check and composer auto-install to init command

2 years agoUpdated env loading to be contained/controlled for usage
Dan Brown [Sat, 4 Mar 2023 15:26:27 +0000 (15:26 +0000)]
Updated env loading to be contained/controlled for usage

2 years agoExtracted program running to its own class
Dan Brown [Sat, 4 Mar 2023 15:06:38 +0000 (15:06 +0000)]
Extracted program running to its own class

2 years agoAdded "init" command to admin-cli
Dan Brown [Sat, 4 Mar 2023 02:40:29 +0000 (02:40 +0000)]
Added "init" command to admin-cli

Got to basic working state, some todos in there.

2 years agoAdded db port support for backup command
Dan Brown [Fri, 3 Mar 2023 21:16:15 +0000 (21:16 +0000)]
Added db port support for backup command

2 years agoAdded error handling and validation to backup command
Dan Brown [Fri, 3 Mar 2023 21:01:30 +0000 (21:01 +0000)]
Added error handling and validation to backup command

2 years agoSplit command out to methods, added flags and out path options
Dan Brown [Fri, 3 Mar 2023 17:22:24 +0000 (17:22 +0000)]
Split command out to methods, added flags and out path options

2 years agoOutlined a general working backup approach
Dan Brown [Fri, 3 Mar 2023 02:44:08 +0000 (02:44 +0000)]
Outlined a general working backup approach

2 years agoStarted playing with a seperate admin-cli
Dan Brown [Thu, 2 Mar 2023 16:31:27 +0000 (16:31 +0000)]
Started playing with a seperate admin-cli

Just playing with libraries & phar-usage right now

2 years agoInitial commit of gitignore
Dan Brown [Thu, 9 Mar 2023 15:27:56 +0000 (15:27 +0000)]
Initial commit of gitignore