@@ -573,7 +573,7 @@ def deploy(
573573 # http://ADDRESS/preview/APP_GUID/BUNDLE_ID
574574 # Using replace makes this a bit more robust to changes in the URL structure
575575 # like connect being served on a subpath.
576- preview_url = app ["url" ].replace ("/content/" , "/preview/" ) + f"/{ app_bundle ['id' ]} "
576+ preview_url = app ["url" ].replace ("/content/" , "/preview/" ). rstrip ( "/" ) + f"/{ app_bundle ['id' ]} "
577577
578578 return {
579579 "task_id" : task ["task_id" ],
@@ -1131,14 +1131,16 @@ def emit_task_log(
11311131 raise_on_error ,
11321132 )
11331133 log_lines = self .remote_server .handle_bad_response (log_lines )
1134- app_config = self .client .app_config (self .deployed_info ["app_id" ])
1135- app_config = self .remote_server .handle_bad_response (app_config )
1136- app_dashboard_url = app_config .get ("config_url" )
1134+
11371135 log_callback .info ("Deployment completed successfully." )
1138- log_callback .info ("\t Dashboard content URL: %s" , app_dashboard_url )
1139- log_callback .info (
1140- "\t Direct content URL: %s" , self .deployed_info ["preview_url" ] or self .deployed_info ["app_url" ]
1141- )
1136+ if self .deployed_info .get ("preview_url" ):
1137+ log_callback .info ("\t Preview content URL: %s" , self .deployed_info ["preview_url" ])
1138+ else :
1139+ app_config = self .client .app_config (self .deployed_info ["app_id" ])
1140+ app_config = self .remote_server .handle_bad_response (app_config )
1141+ app_dashboard_url = app_config .get ("config_url" )
1142+ log_callback .info ("\t Dashboard content URL: %s" , app_dashboard_url )
1143+ log_callback .info ("\t Direct content URL: %s" , self .deployed_info ["app_url" ])
11421144
11431145 return self
11441146
0 commit comments