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
feat: support feature branch names containing slashes
Branch names like "feature/ABC-12" were used verbatim as the instance
directory and url segment, which nested the instance and broke listing,
cleanup and deletion, while the database name silently dropped the slash.
Normalize path separators to hyphens in one place and route every consumer
through it. Names consisting of allowed characters only stay unchanged, so
existing instances and databases remain reachable.
The `--feature=` value may be a full branch name. Path separators are replaced by a hyphen so the instance stays a single flat directory, url segment and database suffix:
59
+
60
+
|`--feature=`| instance name |
61
+
|----------------------|----------------------|
62
+
|`TEST-01`|`TEST-01`|
63
+
|`feature/TEST-01`|`feature-TEST-01`|
64
+
|`bugfix/TEST-01`|`bugfix-TEST-01`|
65
+
|`release/1.2.0`|`release-1.2.0`|
66
+
67
+
Names that already consist of letters, digits, `_`, `-` and `.` are used unchanged, so existing instances and their databases stay reachable. Since the branch prefix is kept, `feature/TEST-01` and `bugfix/TEST-01` remain two separate instances. The same normalization is applied by `feature:cleanup` when it compares remote git branches with the deployed instances.
68
+
58
69
The recipe already wires this task into the deploy flow, together with a `feature:init` before `deploy:info`. That ordering matters: `deploy:info` resolves `{{release_name}}` and deployer caches the result for the rest of the run, so the feature instance has to be known before it runs. Do not hook `feature:setup` any earlier yourself.
59
70
60
71
> Upgrading: if your `deploy.php` carries a `before('deploy:info', 'feature:init')` (or an equivalent `feature:setup` hook) as a workaround for that ordering, remove it — the recipe registers it now and the hook would otherwise run twice.
@@ -75,7 +86,7 @@ This configuration defines the local template file as well as the remote target
75
86
|`DEPLOYER_CONFIG_DATABASE_PORT`| default is `3306`, overwrite with deployer `set('database_port', '3306');`|
76
87
|`DEPLOYER_CONFIG_DATABASE_USER`| should be defined with `database_user` in the host configuration |
77
88
|`DEPLOYER_CONFIG_DATABASE_NAME`| will be dynamically generated |
78
-
|`DEPLOYER_CONFIG_FEATURE_NAME`|will be provide with the `--feature=` command line argument|
89
+
|`DEPLOYER_CONFIG_FEATURE_NAME`|the normalized instance name derived from the `--feature=` command line argument |
79
90
|`DEPLOYER_CONFIG_FEATURE_URL`| will be dynamically generated |
80
91
|`DEPLOYER_CONFIG_FEATURE_PATH`| will be dynamically generated |
0 commit comments