Skip to content

Commit 42ccdc8

Browse files
Improve the configuration options console output in provision:configure (deployphp#3840)
* Improvise configuration output message for provision:configure * Regenerate docs using php bin/docgen
1 parent 03ffe14 commit 42ccdc8

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

docs/recipe/provision.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ return run("lsb_release -s -c");
2929

3030

3131
### sudo_password
32-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L228)
32+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L233)
3333

3434

3535

@@ -39,7 +39,7 @@ return askHiddenResponse(' Password for sudo: ');
3939

4040

4141
### ssh_copy_id
42-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L234)
42+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L239)
4343

4444
Specify which key to copy to server.
4545
Set to `false` to disable copy of key.
@@ -95,63 +95,63 @@ Collects required params.
9595

9696

9797
### provision:update
98-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L94)
98+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L99)
9999

100100
Adds repositories and update.
101101

102102

103103

104104

105105
### provision:upgrade
106-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L116)
106+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L121)
107107

108108
Upgrades all packages.
109109

110110

111111

112112

113113
### provision:install
114-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L123)
114+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L128)
115115

116116
Installs packages.
117117

118118

119119

120120

121121
### provision:server
122-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L157)
122+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L162)
123123

124124
Configures a server.
125125

126126

127127

128128

129129
### provision:ssh
130-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L218)
130+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L223)
131131

132132
Configures the ssh.
133133

134134

135135

136136

137137
### provision:deployer
138-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L237)
138+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L242)
139139

140140
Setups a deployer user.
141141

142142

143143

144144

145145
### provision:firewall
146-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L284)
146+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L289)
147147

148148
Setups a firewall.
149149

150150

151151

152152

153153
### provision:verify
154-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L292)
154+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L297)
155155

156156
Verifies what provision was successful.
157157

recipe/provision.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@
7373
'db_name',
7474
'db_password',
7575
];
76-
$code = "\n\n host(<info>'{{alias}}'</info>)";
77-
foreach ($params as $name) {
78-
$code .= "\n ->set(<info>'$name'</info>, <info>'…'</info>)";
76+
$code = "\n\n<comment>* To streamline script execution, include the following configuration in your <info>deploy.php</info>.</comment>";
77+
$code .= "\n<fg=magenta> - Do not include sensitive information if the file is shared. Replace <info>…</info> with actual data</>";
78+
$code .= "\n<fg=magenta> - If a database configuration is not required, 'db_user', 'db_name', and 'db_password' can be omitted.</>";
79+
$code .= "\n\n<comment>====== Configuration Start ======</comment>";
80+
$code .= "\nhost(<info>'{{alias}}'</info>)";
81+
foreach (array_merge($params, $dbparams) as $name) {
82+
$code .= "\n ->set(<info>'$name'</info>, <info>'…'</info>)";
7983
}
80-
$code .= ";\n\n";
81-
writeln($code);
84+
$code .= ";\n";
85+
$code .= "<comment>====== Configuration End ======</comment>\n\n";
86+
writeln($code);
8287
foreach ($params as $name) {
8388
get($name);
8489
}

0 commit comments

Comments
 (0)