Skip to content

Commit

Permalink
Merge pull request #835 from DustinCampbell/build-script-work
Browse files Browse the repository at this point in the history
Build script work
  • Loading branch information
DustinCampbell authored Apr 27, 2017
2 parents 67c3406 + 9864450 commit 9e6edc4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
23 changes: 16 additions & 7 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,14 @@ Task("PopulateRuntimes")
"default", // To allow testing the published artifact
"ubuntu.14.04-x64",
"ubuntu.16.04-x64",
"ubuntu.16.10-x64",
"centos.7-x64",
"rhel.7.2-x64",
"debian.8-x64",
"fedora.23-x64",
"opensuse.13.2-x64");
"fedora.24-x64",
"opensuse.13.2-x64",
"opensuse.42.1-x64");
}
else
{
Expand Down Expand Up @@ -627,18 +630,24 @@ Task("OnlyPublish")

foreach (var runtime in buildPlan.TargetRids)
{
if (completed.Contains(runtime))
{
continue;
}

var rid = runtime.Equals("default")
? buildPlan.GetDefaultRid()
: runtime;

if (completed.Contains(rid))
// Restore the OmniSharp.csproj with this runtime.
PrintBlankLine();
var runtimeText = runtime;
if (runtimeText.Equals("default"))
{
continue;
runtimeText += " (" + rid + ")";
}

// Restore the OmniSharp.csproj with this runtime.
PrintBlankLine();
Information($"Restoring packages in {projectName} for {rid}...");
Information($"Restoring packages in {projectName} for {runtimeText}...");

RunTool(env.DotNetCommand, $"restore \"{projectFileName}\" --runtime {rid}", env.WorkingDirectory)
.ExceptionOnError($"Failed to restore {projectName} for {rid}.");
Expand Down Expand Up @@ -677,7 +686,7 @@ Task("OnlyPublish")
}
}

completed.Add(rid);
completed.Add(runtime);
}

CreateRunScript(CombinePaths(env.Folders.ArtifactsPublish, project, "default"), env.Folders.ArtifactsScripts);
Expand Down
13 changes: 4 additions & 9 deletions scripts/archiving.cake
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ string GetBuildIdentifier(string runtime, string framework)
}
else
{
// Remove version number. Note: because there are separate versions for Ubuntu 14 and 16,
// we treat Ubuntu as a special case.
if (runtime.StartsWith("ubuntu.14"))
// Remove version number for Windows and OSX.
if (runtime.StartsWith("win") || runtime.StartsWith("osx"))
{
runtimeShort = "ubuntu14-x64";
}
else if (runtime.StartsWith("ubuntu.16"))
{
runtimeShort = "ubuntu16-x64";
runtimeShort = Regex.Replace(runtime, "(\\d|\\.)*-", "-");
}
else
{
runtimeShort = Regex.Replace(runtime, "(\\d|\\.)*-", "-");
runtimeShort = runtime;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/OmniSharp/OmniSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<WarningsAsErrors>true</WarningsAsErrors>
<PreserveCompilationContext>true</PreserveCompilationContext>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;fedora.24-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dotnet5.4;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>

Expand Down

0 comments on commit 9e6edc4

Please sign in to comment.