We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbdf359 commit 4c3f451Copy full SHA for 4c3f451
1 file changed
lib/deploy.sh
@@ -20,7 +20,17 @@ deploy_command() {
20
_deploy_run() {
21
local app="$1" home="/home/${app}"
22
local df="${home}/.deployer/deploy.php"
23
- [[ ! -f "$df" ]] && { error "Deployer config not found: $df"; exit 1; }
+ if [[ ! -f "$df" ]]; then
24
+ step "Creating deployer config..."
25
+ source "${CIPI_LIB}/app.sh"
26
+ local repo branch php_ver
27
+ repo=$(app_get "$app" repository)
28
+ branch=$(app_get "$app" branch)
29
+ php_ver=$(app_get "$app" php)
30
+ [[ -z "$repo" || -z "$php_ver" ]] && { error "App config incomplete (repository/php). Run: cipi app edit $app"; exit 1; }
31
+ _create_deployer_config "$app" "${repo}" "${branch:-main}" "$php_ver"
32
+ success "Deployer config created"
33
+ fi
34
35
info "Deploying '${app}'..."
36
echo ""
0 commit comments