Skip to content

Commit

Permalink
Merge pull request #523 from hal-ler/publishlinux
Browse files Browse the repository at this point in the history
Quickfixes for release
  • Loading branch information
david-driscoll committed Apr 14, 2016
2 parents 8aa8461 + 4df23ae commit f9b6f2e
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ deploy:
api_key:
secure: N9hansErZKHl7G5Ed/hcBgwcvLuRjB7YAskAvSAYB+luacV6rSK7Vlm/4NyjaZCwWv5wOdBphle2S4yZLRDTdMwLrdQWwWYeZI60kE22c1amKJaf6j5ai2u/P3bt55klQ2yO2U/LacwHVoRtJlVdwSAXuDQ3zMd88VbBModQyxE=
file_glob: true
file: artifacts/package/*${TRAVIS_OS_NAME}*.tar.gz
file: artifacts/package/*.tar.gz
skip_cleanup: true
on:
repo: OmniSharp/omnisharp-roslyn
Expand Down
8 changes: 4 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ Task("OnlyPublish")
}

var buildIdentifier = $"{runtimeShort}-{framework}";
// Linux + net451 is renamed to Mono
if (runtimeShort.Contains("ubuntu-") && framework.Equals("net451"))
// Travis/Linux + default + net451 is renamed to Mono
if (string.Equals(EnvironmentVariable("TRAVIS_OS_NAME"), "linux") && runtime.Equals("default") && framework.Equals("net451"))
{
buildIdentifier ="linux-mono";
}
// No need to package for <!win7> + net451
else if (!runtimeShort.Contains("win7-") && framework.Equals("net451"))
// No need to archive for other Travis + net451 combinations
else if (EnvironmentVariable("TRAVIS_OS_NAME") != null && framework.Equals("net451"))
{
continue;
}
Expand Down
4 changes: 1 addition & 3 deletions src/OmniSharp.MSBuild/MSBuildLogForwarder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if DNX451
using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -72,5 +71,4 @@ private void OnWarning(object sender, Microsoft.Build.Framework.BuildWarningEven
});
}
}
}
#endif
}
4 changes: 0 additions & 4 deletions src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ public void Initalize(IConfiguration configuration)
}

var compilationOptions = new CSharpCompilationOptions(projectFileInfo.OutputKind);
#if DNX451
compilationOptions = compilationOptions.WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default);
#endif

if (projectFileInfo.AllowUnsafe)
{
Expand Down Expand Up @@ -317,10 +315,8 @@ private void UpdateProject(ProjectFileInfo projectFileInfo)
{
continue;
}
#if DNX451
var analyzerReference = new AnalyzerFileReference(analyzerPath, new SimpleAnalyzerAssemblyLoader());
project.AddAnalyzerReference(analyzerReference);
#endif
}
}

Expand Down
8 changes: 0 additions & 8 deletions src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
using System.IO;
using System.Linq;
using System.Runtime.Versioning;
#if DNX451
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Evaluation;
#endif
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -54,7 +52,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
var projectFileInfo = new ProjectFileInfo();
projectFileInfo.ProjectFilePath = projectFilePath;

#if DNX451
if (!PlatformHelper.IsMono)
{
var properties = new Dictionary<string, string>
Expand Down Expand Up @@ -215,9 +212,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
projectFileInfo.DefineConstants = defineConstants.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToList();
}
}
#else
// TODO: Shell out to msbuild/xbuild here?
#endif
return projectFileInfo;
}

Expand All @@ -240,7 +234,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
}
}

#if DNX451
static class DictionaryExt
{
public static string GetPropertyValue(this Dictionary<string, BuildProperty> dict, string key)
Expand All @@ -250,5 +243,4 @@ public static string GetPropertyValue(this Dictionary<string, BuildProperty> dic
: null;
}
}
#endif
}
4 changes: 2 additions & 2 deletions src/OmniSharp.Nuget/OmniSharpSourceRepositoryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
#if DNX451
#if NET451
using NuGet.Protocol.Core.Types;
using NuGet.Configuration;
using NuGet.Protocol.Core.v2;
Expand All @@ -11,7 +11,7 @@

namespace OmniSharp.NuGet
{
#if DNX451
#if NET451
public class OmniSharpSourceRepositoryProvider : ISourceRepositoryProvider
{
private static PackageSource[] DefaultPrimarySources = {
Expand Down
4 changes: 2 additions & 2 deletions src/OmniSharp.Nuget/Services/PackageSearchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Recommendations;
using Microsoft.CodeAnalysis.Text;
#if DNX451
#if NET451
using NuGet.Logging;
using NuGet.Packaging.Core;
using NuGet.Protocol.Core.Types;
Expand All @@ -20,7 +20,7 @@

namespace OmniSharp
{
#if DNX451
#if NET451
[OmniSharpHandler(OmnisharpEndpoints.PackageSearch, "NuGet")]
public class PackageSearchService : RequestHandler<PackageSearchRequest, PackageSearchResponse>
{
Expand Down
4 changes: 2 additions & 2 deletions src/OmniSharp.Nuget/Services/PackageSourceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Recommendations;
using Microsoft.CodeAnalysis.Text;
#if DNX451
#if NET451
using NuGet.Logging;
using NuGet.Packaging.Core;
using NuGet.Protocol.Core.Types;
Expand All @@ -20,7 +20,7 @@

namespace OmniSharp
{
#if DNX451
#if NET451
[OmniSharpHandler(OmnisharpEndpoints.PackageSource, "NuGet")]
public class PackageSourceService : RequestHandler<PackageSourceRequest, PackageSourceResponse>
{
Expand Down
4 changes: 2 additions & 2 deletions src/OmniSharp.Nuget/Services/PackageVersionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Recommendations;
using Microsoft.CodeAnalysis.Text;
#if DNX451
#if NET451
using NuGet.Logging;
using NuGet.Packaging.Core;
using NuGet.Protocol.Core.Types;
Expand All @@ -20,7 +20,7 @@

namespace OmniSharp
{
#if DNX451
#if NET451
[OmniSharpHandler(OmnisharpEndpoints.PackageVersion, "NuGet")]
public class PackageVersionService : RequestHandler<PackageVersionRequest, PackageVersionResponse>
{
Expand Down
4 changes: 2 additions & 2 deletions src/OmniSharp.Roslyn.CSharp/Workers/Refactoring/FixUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task<FixUsingsResponse> FixUsings(OmnisharpWorkspace workspace, IEn
_semanticModel = await document.GetSemanticModelAsync();
await AddMissingUsings(codeActionProviders);
await RemoveUsings(codeActionProviders);
#if DNX451
#if NET451
await SortUsings();
#endif
await TryAddLinqQuerySyntax();
Expand Down Expand Up @@ -167,7 +167,7 @@ private async Task RemoveUsings(IEnumerable<ICodeActionProvider> codeActionProvi
return;
}

#if DNX451
#if NET451
private async Task SortUsings()
{
// Sort usings
Expand Down

0 comments on commit f9b6f2e

Please sign in to comment.