Exemple #1
0
        public static void NpmBumpVersion(this ICakeContext context, NpmBumpVersionSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            AddinInformation.LogVersionInformation(context.Log);
            var tool = new NpmBumpVersionTool(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log);

            tool.BumpVersion(settings);
        }
Exemple #2
0
        public static void NpmBumpVersion(this ICakeContext context, Action <NpmBumpVersionSettings> configurator)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var settings = new NpmBumpVersionSettings();

            configurator(settings);
            context.NpmBumpVersion(settings);
        }