aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs
diff options
context:
space:
mode:
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.cs50
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)