private void RunDeploymentSync(Sage.Platform.Deployment.Deployment deployment) { var wrapper = new DeploymentCallbackWrapper(); try { log.Info(Resources.log_deployment_started); wrapper.DeployPortal(deployment); log.Info(Resources.log_deployment_ended); } catch { } }
/// <summary> /// Handles the deployment of a portal /// </summary> private void DeployPortal() { string portalName = Manifest.PortalName; PortalApplication application = PortalApplication.Get(portalName); if (application != null) { var deployment = new Sage.Platform.Deployment.Deployment { DeploymentName = portalName }; InitializeDeployment(deployment, application.Id.ToString()); var wrapper = new DeploymentCallbackWrapper(); try { log.Info(Resources.log_deployment_started); wrapper.DeployPortal(deployment); log.Info(Resources.log_deployment_ended); var callback = new PrecompileBuildManagerCallback(); var buildParameter = new ClientBuildManagerParameter { PrecompilationFlags = PrecompilationFlags.OverwriteTarget | PrecompilationFlags.Clean | PrecompilationFlags.CodeAnalysis }; if (Manifest.Precompile) { log.Info(Resources.log_precompile_started); DeploymentUtil util = new DeploymentUtil(); util.PrecompileSite(callback, buildParameter, Manifest.DeploymentPath, null, null, "/" + portalName, false); log.Info(Resources.log_precompile_finished); } } catch (Exception ex) { log.Error(Resources.error_deploying_portal, ex); } } }