Esempio n. 1
0
        private static int HandleBump(BumpOptions options)
        {
            VersionFile versionFile = VersionFile.Load();

            switch (options.Component)
            {
            case BumpOptions.VersionComponent.Major:
                versionFile.BumpMajor();
                break;

            case BumpOptions.VersionComponent.Minor:
                versionFile.BumpMinor();
                break;

            case BumpOptions.VersionComponent.Patch:
                versionFile.BumpPatch();
                break;

            default:
                throw new ArgumentException("Must specify a component to bump");
            }

            versionFile.SerializeToFile();
            return(0);
        }
Esempio n. 2
0
        private static int HandleInit(InitOptions options)
        {
            VersionFile versionFile = new VersionFile();

            versionFile.SetVersion(options.InitialVersion);
            versionFile.SerializeToFile();
            return(0);
        }