Skip to content

Commit fa61a28

Browse files
committed
Update README.md with usefull information
I have added more informations on how to keep the repo updated: - how to update the framework - how to update the tarballs The changes have been requested in this issue #1
1 parent cdc992e commit fa61a28

File tree

1 file changed

+54
-1
lines changed

1 file changed

+54
-1
lines changed

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,57 @@ For more information, see the [CodeIgniter 4 Installation Guide](https://codeign
1212

1313
```
1414
ddev config --name=testpkgcodeigniter4 --project-type=codeigniter --docroot=public
15-
```
15+
```
16+
17+
## Update the repo
18+
19+
### Update the framework
20+
21+
Most updates require you to manually update configuration files like `app/Config/App.php` or `app/Config/Filters.php`, the easiest way to update this test project is to start over.
22+
1. Delete all the files from the framework: **make sure you're in the project directory**
23+
```bash
24+
# will delete everything except for README.md, .gitignore and the .git (the only two file that is not from the framework)
25+
find . -maxdepth 1 ! -name 'README.md' ! -name '.gitignore' ! -name '.git' ! -name '.' -exec rm -rf {} +
26+
```
27+
2. Create a new project:
28+
```bash
29+
composer create-project codeigniter4/appstarter project-root
30+
```
31+
3. Copy the contents of the directory in which you created the app to the root dir:
32+
```bash
33+
rsync -av --exclude='README.md' --exclude='.gitignore' --exclude='.git' project-root/ ./
34+
```
35+
4. Delete the directory in which you created the app:
36+
```bash
37+
rm -rf project-root/
38+
```
39+
40+
### update tarballs
41+
42+
#### Database tarball (`db.sql.tar.gz`)
43+
The database tarball contains the output of running migrations on a fresh CodeIgniter 4 install (creates an empty migrations table).
44+
45+
To create/update:
46+
```bash
47+
# Run migrations to create the database structure
48+
php spark migrate
49+
50+
# Export the database (adjust credentials as needed)
51+
mysqldump -u root -p db > db.sql
52+
53+
# Create the tarball
54+
tar -czf db.sql.tar.gz db.sql
55+
56+
# Clean up
57+
rm db.sql
58+
```
59+
60+
#### Files tarball (`files.tar.gz`)
61+
The files tarball contains the readme.md and welcome page assets used in ddev/ddev tests.
62+
63+
To create/update:
64+
```bash
65+
tar -czf files.tar.gz files
66+
```
67+
68+
**Note:** These tarballs are used by the automated tests in the main ddev/ddev repository.

0 commit comments

Comments
 (0)