public static void Initialize() { VersionSystem version = new VersionSystem(); if (System.Diagnostics.Debugger.IsAttached) { version.Major = DateTime.Today.Year; version.Minor = 5; version.Build = int.Parse(string.Format("{0}{1}", DateTime.Today.Month, DateTime.Today.Day)); version.Revision = "rc.1"; Properties.Settings.Default.Version = VersionSystem.ToString(version); Properties.Settings.Default.Save(); } Version = VersionSystem.Parse(Properties.Settings.Default.Version); StatusBar.SetVersionDisplay(Version.ToString()); try { GitHubApp = new GitHub("winterstudios", "MeioMundo"); VersionSystem OnlineVersion = VersionSystem.Parse(GitHubApp.Releases.GetLastRelease().tag_name); bool update = VersionSystem.Compare(Version, OnlineVersion); } catch (Exception ex) { } }
static void Main(string[] args) { Editor.API.GitHub.GitHub gitHub = new Editor.API.GitHub.GitHub("winterstudios", "MeioMundo"); VersionSystem version = new VersionSystem(); version = VersionSystem.Parse(gitHub.Releases.GetLastRelease(true).tag_name); Console.WriteLine(version); Console.ReadLine(); }
public Repository(string name, VersionSystem vcs, Uri uri) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (uri == null) { throw new ArgumentNullException(nameof(uri)); } Name = name; Vcs = vcs; Uri = uri; }
public RepositoryClient GetRepositoryClient(VersionSystem vcs) { return(_repositoryClients.FirstOrDefault(c => c.Vcs == vcs)); }