Ejemplo n.º 1
0
        public static void ChocolateyPack(this ICakeContext context, FilePath nuspecFilePath, ChocolateyPackSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var resolver = new ChocolateyToolResolver(context.FileSystem, context.Environment);
            var packer   = new ChocolateyPacker(context.FileSystem, context.Environment, context.ProcessRunner, context.Log, context.Tools, resolver);

            packer.Pack(nuspecFilePath, settings);
        }
Ejemplo n.º 2
0
        public static void ChocolateyPack(this ICakeContext context, ChocolateyPackSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            var resolver = new ChocolateyToolResolver(context.FileSystem, context.Environment);
            var packer   = new ChocolateyPacker(context.FileSystem, context.Environment, context.ProcessRunner, context.Log, context.Globber, resolver);

            packer.Pack(settings);
        }
Ejemplo n.º 3
0
        public string Pack(bool nuspec = true)
        {
            string content = null;

            ProcessRunner.When(p => p.Start(Arg.Any <FilePath>(), Arg.Any <ProcessSettings>()))
            .Do(info => {
                content = GetContent(info[1] as ProcessSettings);
            });

            var tool = new ChocolateyPacker(FileSystem, Environment, ProcessRunner, Log, Globber, ChocolateyToolResolver);

            if (nuspec)
            {
                tool.Pack(NuSpecFilePath, Settings);
            }
            else
            {
                tool.Pack(Settings);
            }

            // Return the content.
            return(content);
        }
Ejemplo n.º 4
0
        protected override void RunTool()
        {
            var tool = new ChocolateyPacker(FileSystem, Environment, ProcessRunner, Log, Tools, Resolver);

            tool.Pack(NuSpecFilePath, Settings);
        }
        protected override void RunTool()
        {
            var tool = new ChocolateyPacker(FileSystem, Environment, ProcessRunner, Log, Globber, Resolver);

            tool.Pack(Settings);
        }