@@ -573,7 +573,7 @@ def deploy(
573
573
# http://ADDRESS/preview/APP_GUID/BUNDLE_ID
574
574
# Using replace makes this a bit more robust to changes in the URL structure
575
575
# 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' ]} "
577
577
578
578
return {
579
579
"task_id" : task ["task_id" ],
@@ -1131,14 +1131,16 @@ def emit_task_log(
1131
1131
raise_on_error ,
1132
1132
)
1133
1133
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
+
1137
1135
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" ])
1142
1144
1143
1145
return self
1144
1146
0 commit comments