Ejemplo n.º 1
0
        public static void NetlifyDeploy(this ICakeContext context, DirectoryPath directoryToDeploy,
                                         NetlfiyDeploySettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var netlifyDeploy = new NetlifyDeployRunner(context.FileSystem, context.Environment, context.ProcessRunner,
                                                        context.Tools);

            netlifyDeploy.Deploy(directoryToDeploy, settings);
        }
Ejemplo n.º 2
0
        public static void NetlifyDeploy(this ICakeContext context, DirectoryPath directoryToDeploy, string siteId,
                                         string token)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (string.IsNullOrWhiteSpace(siteId))
            {
                throw new ArgumentNullException(nameof(siteId));
            }
            if (string.IsNullOrWhiteSpace(token))
            {
                throw new ArgumentNullException(nameof(token));
            }

            var netlifyDeploy = new NetlifyDeployRunner(context.FileSystem, context.Environment, context.ProcessRunner,
                                                        context.Tools);

            netlifyDeploy.Deploy(directoryToDeploy, new NetlfiyDeploySettings {
                SiteId = siteId, Token = token
            });
        }
Ejemplo n.º 3
0
        protected override void RunTool()
        {
            var tool = new NetlifyDeployRunner(FileSystem, Environment, ProcessRunner, Tools);

            tool.Deploy(DirectoryToDeploy, Settings);
        }