diff options
| author | Mirta <mirta@twine-s.com> | 2020-12-30 14:27:05 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-12-30 14:27:05 +0200 |
| commit | 1344a54c37f7cbba7a294674b4b733d72ee257ea (patch) | |
| tree | 4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs | |
| parent | 124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff) | |
| parent | 281610ac56799f6870c587a942495d91cd55b227 (diff) | |
| download | Tango-1344a54c.tar.gz Tango-1344a54c.zip | |
Hope it is fine
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs index eeafa513f..92326f26f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs @@ -12,7 +12,6 @@ using Tango.AdvancedInstaller; using Tango.Core; using Tango.Core.Cryptography; using Tango.Core.Helpers; -using Tango.Git; using Tango.MachineStudio.Common.Web; using Tango.Transport.Web; using Tango.Web; @@ -256,55 +255,6 @@ namespace Tango.MachineStudio.Common.Publish throw new InvalidOperationException("The remote version does not seems to have been updated."); } - if (Options.CreateTag) - { - String repoPath = Path.GetFullPath("../../../../../"); - String tagVersion = System.Version.Parse(GetLocalVersion()).ToString(3); - String tagName = $"Machine_Studio_v{tagVersion}"; - - using (GitRepositoryManager git = new GitRepositoryManager(repoPath, Options.Email, Options.PersonalAccessToken)) - { - OnPublishProgress(0, 100, "Checking repository changes..."); - int changes = git.GetChanges().Count; - if (changes > 0) - { - if (Options.AutoCommitAndPush) - { - OnPublishProgress(0, 100, "Committing repository changes..."); - git.Commit(tagName); - } - else - { - throw new InvalidOperationException($"There are {changes} uncommitted changes on the repository. Please commit and push all changes before creating the Tag"); - } - } - - OnPublishProgress(0, 100, "Checking outgoing commits..."); - int commits = git.GetOutgoingCommits().Count; - if (commits > 0) - { - if (Options.AutoCommitAndPush) - { - OnPublishProgress(0, 100, "Pushing repository changes..."); - git.Sync(); - } - else - { - throw new InvalidOperationException($"There are {commits} outgoing commits on the repository. Please push all commits before creating the Tag"); - } - } - - git.Progress += (x, e) => - { - OnPublishProgress(e.Progress.Value, e.Progress.Maximum, $"Pushing Tag '{tagName}'..."); - }; - - OnPublishProgress(0, 100, $"Creating Tag '{tagName}'..."); - - git.CreatePushTag(tagName, Options.Comments, "Roy Ben Shabat"); - } - } - OnPublishProgress(0, 0, "Version published successfully."); } catch (Exception ex) |
