Add Travis CI build (#69)

This commit is contained in:
Frederik Carlier
2018-08-30 22:53:15 +02:00
committed by GitHub
parent c19298e3dc
commit 333273c499
7 changed files with 24 additions and 17 deletions

11
.travis.yml Normal file
View File

@@ -0,0 +1,11 @@
language: csharp
mono: none
dotnet: 2.1.400
git:
depth: false
script:
- dotnet restore dotnet-packaging.sln
- dotnet pack dotnet-packaging.sln -c Release
- dotnet test Packaging.Targets.Tests/Packaging.Targets.Tests.csproj

View File

@@ -3,6 +3,7 @@ using Microsoft.Build.Utilities;
using Packaging.Targets.IO;
using System;
using System.Collections.Generic;
using System.IO;
using Xunit;
namespace Packaging.Targets.Tests
@@ -31,7 +32,7 @@ namespace Packaging.Targets.Tests
Assert.Equal(LinuxFileMode.S_IROTH | LinuxFileMode.S_IRGRP | LinuxFileMode.S_IRUSR | LinuxFileMode.S_IFREG, readme.Mode);
Assert.Equal("root", readme.Owner);
Assert.False(readme.RemoveOnUninstall);
Assert.Equal("archive\\README.md", readme.SourceFilename);
Assert.Equal(Path.Combine("archive", "README.md"), readme.SourceFilename);
Assert.Equal("/opt/demo/README.md", readme.TargetPath);
Assert.Equal("/opt/demo/README.md", readme.TargetPathWithFinalSlash);
Assert.Equal(ArchiveEntryType.None, readme.Type);
@@ -44,7 +45,7 @@ namespace Packaging.Targets.Tests
Assert.Equal(LinuxFileMode.S_IROTH | LinuxFileMode.S_IRGRP | LinuxFileMode.S_IRUSR | LinuxFileMode.S_IFREG, script.Mode);
Assert.Equal("root", script.Owner);
Assert.False(script.RemoveOnUninstall);
Assert.Equal("archive\\script.sh", script.SourceFilename);
Assert.Equal(Path.Combine("archive", "script.sh"), script.SourceFilename);
Assert.Equal("/opt/demo/script.sh", script.TargetPath);
Assert.Equal("/opt/demo/script.sh", script.TargetPathWithFinalSlash);
Assert.Equal(ArchiveEntryType.None, script.Type);
@@ -79,7 +80,7 @@ namespace Packaging.Targets.Tests
Assert.Equal(LinuxFileMode.S_IROTH | LinuxFileMode.S_IRGRP | LinuxFileMode.S_IRUSR | LinuxFileMode.S_IFREG, readme.Mode);
Assert.Equal("root", readme.Owner);
Assert.False(readme.RemoveOnUninstall);
Assert.Equal("archive\\README.md", readme.SourceFilename);
Assert.Equal(Path.Combine("archive", "README.md"), readme.SourceFilename);
Assert.Equal("/opt/demo/README.md", readme.TargetPath);
Assert.Equal("/opt/demo/README.md", readme.TargetPathWithFinalSlash);
Assert.Equal(ArchiveEntryType.None, readme.Type);
@@ -94,7 +95,7 @@ namespace Packaging.Targets.Tests
Assert.Equal(LinuxFileMode.S_IXOTH | LinuxFileMode.S_IROTH | LinuxFileMode.S_IXGRP | LinuxFileMode.S_IRGRP | LinuxFileMode.S_IXUSR | LinuxFileMode.S_IWUSR | LinuxFileMode.S_IRUSR, script.Mode);
Assert.Equal("root", script.Owner);
Assert.False(script.RemoveOnUninstall);
Assert.Equal("archive\\script.sh", script.SourceFilename);
Assert.Equal(Path.Combine("archive", "script.sh"), script.SourceFilename);
Assert.Equal("/bin/script.sh", script.TargetPath);
Assert.Equal("/bin/script.sh", script.TargetPathWithFinalSlash);
Assert.Equal(ArchiveEntryType.None, script.Type);

View File

@@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.5;netstandard2.0</TargetFrameworks>
<VersionPrefix>0.1.1</VersionPrefix>
<NugetPackageFolder Condition="$(NugetPackageFolder) == ''">$(USERPROFILE)\.nuget\packages</NugetPackageFolder>
<Authors>Frederik Carlier</Authors>
<Company>Quamotion</Company>
<Product>Packaging Tools for .NET CLI</Product>
@@ -65,21 +64,21 @@
</Content>
<!-- SharpZipLib -->
<Content Include="$(NugetPackageRoot)\sharpziplib.netstandard\0.86.0.1\lib\netstandard1.3\SharpZipLib.NETStandard.dll" Link="SharpZipLib.NETStandard.dll">
<Content Include="$(NuGetPackageRoot)\sharpziplib.netstandard\0.86.0.1\lib\netstandard1.3\SharpZipLib.NETStandard.dll" Link="SharpZipLib.NETStandard.dll">
<Pack>true</Pack>
<PackagePath>tools\netstandard1.5\</PackagePath>
</Content>
<Content Include="$(NugetPackageRoot)\sharpziplib.netstandard\0.86.0.1\lib\netstandard1.3\SharpZipLib.NETStandard.dll" Link="SharpZipLib.NETStandard.dll">
<Content Include="$(NuGetPackageRoot)\sharpziplib.netstandard\0.86.0.1\lib\netstandard1.3\SharpZipLib.NETStandard.dll" Link="SharpZipLib.NETStandard.dll">
<Pack>true</Pack>
<PackagePath>tools\netstandard2.0\</PackagePath>
</Content>
<!-- Bouncy Castle-->
<Content Include="$(NugetPackageRoot)\portable.bouncycastle\1.8.1.3\lib\netstandard1.3\BouncyCastle.Crypto.dll" Link="BouncyCastle.Crypto.dll">
<Content Include="$(NuGetPackageRoot)\portable.bouncycastle\1.8.1.3\lib\netstandard1.3\BouncyCastle.Crypto.dll" Link="BouncyCastle.Crypto.dll">
<Pack>true</Pack>
<PackagePath>tools\netstandard1.5\</PackagePath>
</Content>
<Content Include="$(NugetPackageRoot)\portable.bouncycastle\1.8.1.3\lib\netstandard2.0\BouncyCastle.Crypto.dll" Link="BouncyCastle.Crypto.dll">
<Content Include="$(NuGetPackageRoot)\portable.bouncycastle\1.8.1.3\lib\netstandard2.0\BouncyCastle.Crypto.dll" Link="BouncyCastle.Crypto.dll">
<Pack>true</Pack>
<PackagePath>tools\netstandard2.0\</PackagePath>
</Content>

View File

@@ -17,7 +17,6 @@ Once you've installed this package as a .NET CLI tool, run dotnet deb to generat
See https://github.com/qmfrederik/dotnet-packaging/ for more information on how to use dotnet deb.</Description>
<Product>Packaging Tools for .NET CLI</Product>
<NugetPackageFolder Condition="$(NugetPackageFolder) == ''">$(USERPROFILE)\.nuget\packages</NugetPackageFolder>
</PropertyGroup>
<ItemGroup>
@@ -28,7 +27,7 @@ See https://github.com/qmfrederik/dotnet-packaging/ for more information on how
</ItemGroup>
<ItemGroup>
<Content Include="$(NugetPackageFolder)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Content Include="$(NuGetPackageRoot)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)\</PackagePath>
</Content>

View File

@@ -17,7 +17,6 @@ Once you've installed this package as a .NET CLI tool, run dotnet rpm to generat
See https://github.com/qmfrederik/dotnet-packaging/ for more information on how to use dotnet rpm.</Description>
<Product>Packaging Tools for .NET CLI</Product>
<NugetPackageFolder Condition="$(NugetPackageFolder) == ''">$(USERPROFILE)\.nuget\packages</NugetPackageFolder>
</PropertyGroup>
<ItemGroup>
@@ -28,7 +27,7 @@ See https://github.com/qmfrederik/dotnet-packaging/ for more information on how
</ItemGroup>
<ItemGroup>
<Content Include="$(NugetPackageFolder)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Content Include="$(NuGetPackageRoot)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)\</PackagePath>
</Content>

View File

@@ -17,7 +17,6 @@ Once you've installed this package as a .NET CLI tool, run dotnet tar to generat
See https://github.com/qmfrederik/dotnet-packaging/ for more information on how to use dotnet tarball.</Description>
<Product>Packaging Tools for .NET CLI</Product>
<NugetPackageFolder Condition="$(NugetPackageFolder) == ''">$(USERPROFILE)\.nuget\packages</NugetPackageFolder>
</PropertyGroup>
<ItemGroup>
@@ -28,7 +27,7 @@ See https://github.com/qmfrederik/dotnet-packaging/ for more information on how
</ItemGroup>
<ItemGroup>
<Content Include="$(NugetPackageFolder)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Content Include="$(NuGetPackageRoot)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)\</PackagePath>
</Content>

View File

@@ -17,7 +17,6 @@ Once you've installed this package as a .NET CLI tool, run dotnet zip to generat
See https://github.com/qmfrederik/dotnet-packaging/ for more information on how to use dotnet tarball.</Description>
<Product>Packaging Tools for .NET CLI</Product>
<NugetPackageFolder Condition="$(NugetPackageFolder) == ''">$(USERPROFILE)\.nuget\packages</NugetPackageFolder>
</PropertyGroup>
<ItemGroup>
@@ -28,7 +27,7 @@ See https://github.com/qmfrederik/dotnet-packaging/ for more information on how
</ItemGroup>
<ItemGroup>
<Content Include="$(NugetPackageFolder)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Content Include="$(NuGetPackageRoot)\microsoft.extensions.commandlineutils\1.1.1\lib\netstandard1.3\Microsoft.Extensions.CommandLineUtils.dll" Link="Microsoft.Extensions.CommandLineUtils.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)\</PackagePath>
</Content>