Skip to content

Commit 12278d0

Browse files
committed
generate linux specific native artifacts
1 parent 64ea37a commit 12278d0

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

build/pack.cake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ void PackPrepareNative(ICakeContext context, BuildParameters parameters)
154154

155155
context.Information("Validating native lib:");
156156

157-
var nativeExe = outputPath.CombineWithFilePath(IsRunningOnWindows() ? "gitversion.exe" : "gitversion");
158-
ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", parameters.Version.GitVersion.FullSemVer);
157+
// testing windows and macos artifacts, ther linux is tested with docker
158+
if (platform != PlatformFamily.Linux)
159+
{
160+
var nativeExe = outputPath.CombineWithFilePath(IsRunningOnWindows() ? "gitversion.exe" : "gitversion");
161+
ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", parameters.Version.GitVersion.FullSemVer);
162+
}
159163
}
160-
161164
}

build/utils/docker.cake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ void DockerPullImage(DockerImage dockerImage, BuildParameters parameters)
109109
DockerContainerRunSettings GetDockerRunSettings(BuildParameters parameters)
110110
{
111111
var currentDir = MakeAbsolute(Directory("."));
112+
var root = parameters.DockerRootPrefix;
112113
var settings = new DockerContainerRunSettings
113114
{
114115
Rm = true,
115116
Volume = new[]
116117
{
117-
$"{currentDir}:{parameters.DockerRootPrefix}/repo",
118-
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/nuget:{parameters.DockerRootPrefix}/nuget",
119-
$"{currentDir}/test-scripts:{parameters.DockerRootPrefix}/scripts"
118+
$"{currentDir}:{root}/repo",
119+
$"{currentDir}/test-scripts:{root}/scripts",
120+
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/nuget:{root}/nuget",
121+
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/native/linux:{root}/native",
120122
}
121123
};
122124

build/utils/parameters.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public class BuildParameters
141141
NativeRuntimes = new Dictionary<PlatformFamily, string[]>
142142
{
143143
[PlatformFamily.Windows] = new[] { "win-x64", "win-x86" },
144-
[PlatformFamily.Linux] = new[] { "linux-x64" },
144+
[PlatformFamily.Linux] = new[] { "debian.9-x64", "centos.7-x64", "fedora.30-x64", "ubuntu.16.04-x64", "ubuntu.18.04-x64" },
145145
[PlatformFamily.OSX] = new[] { "osx-x64" },
146146
};
147147

test-scripts/Test-DotnetGlobalTool.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ param(
44
[parameter(Mandatory=$true, Position=2)][string] $repoPath
55
)
66

7-
$result = dotnet tool install GitVersion.Tool --version $version --tool-path $rootPrefix/tools --add-source $nugetPath | out-null;
7+
$result = dotnet tool install GitVersion.Tool --version $version --tool-path /tools --add-source $nugetPath | out-null;
88

99
if($LASTEXITCODE -eq 0) {
10-
& "$rootPrefix/tools/dotnet-gitversion" $repoPath /showvariable FullSemver;
10+
& "/tools/dotnet-gitversion" $repoPath /showvariable FullSemver;
1111
} else {
1212
Write-Output $result
1313
}

0 commit comments

Comments
 (0)