Merge pull request #763 from tgstation/762-oof [TGSDeploy]

Fix some fuck
This commit is contained in:
Jordan Brown
2018-10-03 08:56:43 -04:00
committed by GitHub
6 changed files with 20 additions and 9 deletions
@@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.0.5</Version>
<Version>4.0.0.6</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -7,5 +7,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("29927416-3b78-49a7-a560-5ccaa638b6b4")]
[assembly: InternalsVisibleTo("Tgstation.Server.Host.Service.Tests")]
[assembly: AssemblyVersion("4.0.0.5")]
[assembly: AssemblyFileVersion("4.0.0.5")]
[assembly: AssemblyVersion("4.0.0.6")]
[assembly: AssemblyFileVersion("4.0.0.6")]
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
<Version>4.0.0.5</Version>
<Version>4.0.0.6</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -23,8 +23,8 @@ namespace Tgstation.Server.Host.Components.Byond
public ByondExecutableLock(Version version, string dreamDaemonPath, string dreamMakerPath)
{
Version = version ?? throw new ArgumentNullException(nameof(version));
dreamDaemonPath = dreamDaemonPath ?? throw new ArgumentNullException(nameof(dreamDaemonPath));
dreamMakerPath = dreamMakerPath ?? throw new ArgumentNullException(nameof(dreamMakerPath));
DreamDaemonPath = dreamDaemonPath ?? throw new ArgumentNullException(nameof(dreamDaemonPath));
DreamMakerPath = dreamMakerPath ?? throw new ArgumentNullException(nameof(dreamMakerPath));
}
//at one point in design, byond versions were to delete themselves if they werent the active version
@@ -587,8 +587,19 @@ namespace Tgstation.Server.Host.Components.Repository
/// <inheritdoc />
public Task<bool> IsSha(string committish, CancellationToken cancellationToken) => Task.Factory.StartNew(() =>
{
var gitObject = repository.Lookup(committish, ObjectType.Commit);
return gitObject != null;
//check if it's a tag
var gitObject = repository.Lookup(committish, ObjectType.Tag);
if (gitObject != null)
return false;
cancellationToken.ThrowIfCancellationRequested();
//check if it's a branch
if (repository.Branches[committish] != null)
return false;
cancellationToken.ThrowIfCancellationRequested();
//err on the side of references, if we can't look it up, assume its a reference
if (repository.Lookup<Commit>(committish) != null)
return true;
return false;
}, cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
}
}
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.0.5</Version>
<Version>4.0.0.6</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">