Beispiel #1
0
	public static int Main (string[] args) 
	{
		Opts opts = new Opts();

		if (args.Length == 0) {
			opts.DoHelp ();
			return 1;
		}
		
		opts.ProcessArgs (args);
		Assembly assm = opts.assembly == null ? null : LoadAssembly (opts.assembly);

		if (opts.path == null || !Directory.Exists (opts.path) || assm == null) {
			Console.WriteLine ("Valid path and assembly options are required.");
			opts.DoHelp ();
			return 1;
		}

		string version = opts.version == null ? assm.GetName ().Version.ToString () : opts.version;
		AssemblyInfo base_info = opts.base_assembly == null ? null : new AssemblyInfo (LoadAssembly (opts.base_assembly));
		AssemblyInfo info = new AssemblyInfo (assm);

		Versionator v = new Versionator (base_info, info, opts.path, version);
		v.Versionate ();

		return 0;
	}
Beispiel #2
0
	public Versionator (AssemblyInfo base_info, AssemblyInfo info, string path, string version)
	{
		this.base_info = base_info;
		this.info = info;
		this.path = path;
		this.version = version;
	}