You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Ignore all files in packages/ (including symlinks)
22
+
# Devlink
23
+
# ignore symlinks in packages/
23
24
packages/*
24
-
# Allow tracking of real directories inside packages/
25
25
!packages/**/
26
-
# Ensure empty directories can be committed
27
26
!packages/*/.gitkeep
28
-
# for windows
27
+
#and for windows
29
28
/packageslocal/*
30
29
31
30
```
32
31
33
32
2. Configure your paths and packages in the `config/devlink.php` file and change the package path in the `.env` file, if needed (Windows users should set the `DEVLINK_PACKAGES_PATH` variable to `packageslocal`).
34
33
35
-
3. When running `devlink:status`:
34
+
3. When running `php init.php`
36
35
37
-
- Lists all packages that are currently devlinked
38
-
- Lists all packages that are configured but not devlinked
39
-
- Lists all packages that are not configured, but devlinked
40
-
- Shows the configuration and the deploy status of each package
36
+
- Creates a `.env` file from `.env.example`
37
+
- Copies `composer.json-deploy` to `composer.json`
38
+
- Runs `composer install`
41
39
42
-
4. When running `devlink:link`:
40
+
4. When running `devlink:status`:
41
+
42
+
- Shows the configuration and status of each package
43
+
- Shows the link status (Linked, Unlinked, Deployed)
44
+
- Shows the update status (Up-to-date, Outdated)
45
+
46
+
5. When running `devlink:link`:
43
47
44
48
- Creates the packages folder, if it does not exist
45
-
- Creates backup of original composer.json → composer.json.original
46
49
- Creates symlinks for all configured packages
47
50
- Updates composer.json with development configuration
48
51
- Creates composer.json-deploy for production use
49
52
- Asks to run `composer install`
50
53
- Asks to run `php artisan optimize:clear`
51
54
- Asks to run `php artisan queue:restart`
52
55
53
-
5. When running `devlink:unlink`:
54
-
55
-
- Removes all symlinks
56
-
- Deletes the packages folder, if empty
57
-
- Creates a backup of composer.json to composer.json-backup
58
-
- Restores original composer.json from composer.json-original
59
-
- Asks to run `composer install`
60
-
- Asks to run `php artisan optimize:clear`
61
-
- Asks to run `php artisan queue:restart`
62
-
63
56
6. When running `devlink:deploy`:
64
57
65
58
- Removes all symlinks
66
59
- Deletes the packages folder, if empty
67
-
- Creates a backup of composer.json to composer.json-backup
68
60
- Restores production-ready composer.json from composer.json-deploy
69
61
- Asks to run `composer install`
70
62
- Asks to run `php artisan optimize:clear`
@@ -73,17 +65,9 @@ packages/*
73
65
7. CI Safety Net - `deploy.sh`:
74
66
75
67
- If composer.json-deploy exists in the repository:
76
-
- the script will restore it as composer.json
77
-
- rename composer.json-original to composer.json-backup
78
-
- Commit and push the change in GH action
79
-
- This ensures no development configuration reaches production
80
-
81
-
## Changing branches
82
-
83
-
If you need to change the branches for ANY of the involved repositories, you just need to run the command again, it will automatically update the symlinks for the current branch.
84
-
85
-
> ⚠️ **Important**
86
-
> If you forget to run the command, when CHANGING BRANCHES ON ANY OF THE REPOS, you will surely run into a 500 error, that drives you nuts.
68
+
- Remove all symlinks from /packages
69
+
- rename composer.json-deploy to composer.json
70
+
- Commit and push the change in your GitHub Action
87
71
88
72
## Mac
89
73
@@ -93,7 +77,7 @@ Mac works out of the box. You can have local packages mixed with the symlinked p
93
77
94
78
## Windows
95
79
96
-
On Windows there are most probably some issues with the symlinks. If you run into issues, you can either globally or project-wise disable the symlinks or do the following:
80
+
On Windows there are most probably some issues with ignoring symlinks. If you run into issues, you can either globally or project-wise disable the symlinks or do the following:
0 commit comments