Пример #1
0
        /// <summary>
        /// Publishes the app to the given directory using the current settings
        /// </summary>
        /// <param name="outputDirectory">Output path for the final published artifacts</param>
        public void PublishTo(DirectoryPath outputDirectory)
        {
            OutputHandlers.Add(new PublishPageHandler());
            Loggers.Add(new CakeLogger(Log));
            var mgr       = new CakePublishManager(this);
            var responses = mgr.PublishApp(outputDirectory.MakeAbsolute(Environment).FullPath,
                                           ForceBuild ? PublishBehaviour.CleanFirst : PublishBehaviour.DoNotBuild);

            foreach (var r in responses)
            {
                Log.Information($"Handler finished: {r.Result} - {r.ResultMessage}");
            }
        }
Пример #2
0
        public ClickTwicePackSettings WithHandler(IHandler handler)
        {
            var input  = handler as IInputHandler;
            var output = handler as IOutputHandler;

            if (input != null)
            {
                InputHandlers.Add(input);
            }
            if (output != null)
            {
                OutputHandlers.Add(output);
            }
            return(this);
        }