Commit a1ea6121 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Added UWP support.

parent 1a39e4db
param ([string] $PackageId, [string] $NuSpecFile)
param ([string] $PackageId)
. .\devops\BuildFunctions.ps1
$nextVersion = Get-Next-Version-String $PackageId
$NuSpecFile = $PackageId + '.nuspec'
Update-NuSpec-Version $NuSpecFile $nextVersion
gitversion /updateassemblyinfo
......@@ -6,23 +6,6 @@ if (-Not (Test-Should-Deploy)) {
return
}
$nextVersion = Get-Next-Version-String $PackageId
$nupkgFile = $PackageId + '.nupkg'
if (Test-Package-Already-Published $PackageId $nextVersion) {
return
}
$versionToUnlist = ""
if (-Not (Test-Version-Stable-Release $nextVersion)) {
$publishedVersion = Get-Published-PreRelase-Package $PackageId
if (-Not (Test-Version-Stable-Release $publishedVersion)) {
$versionToUnlist = $publishedVersion
}
}
& nuget push *.nupkg -Source https://www.nuget.org/api/v2/package
# Unlist previous Pre-Release packages.
if ($versionToUnlist -ne "") {
& $nuget delete $versionToUnlist -Source https://www.nuget.org/api/v2/package
}
\ No newline at end of file
& nuget push $nupkgFile -Source https://www.nuget.org/api/v2/package
......@@ -37,7 +37,8 @@ jobs:
inputs:
targetType: filePath
filePath: ./devops/PreBuild.ps1
arguments: 'NLua NLua.nuspec'
arguments: 'NLua'
pwsh: true
- task: MSBuild@1
displayName: 'Build solution NLua.sln'
......@@ -51,7 +52,7 @@ jobs:
solution: NLua.Mac.sln
configuration: Release
- script: 'mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe ./tests/build/net45/bin/Release/NLuaTest.dll --result=TEST-Result-Mac.xml'
- script: 'mono packages/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe ./tests/build/net45/bin/Release/NLuaTest.dll --result=TEST-Result-Mac.xml'
displayName: 'Run OSX tests'
- task: PublishTestResults@2
......@@ -156,6 +157,11 @@ jobs:
inputs:
restoreSolution: NLua.sln
- task: NuGetCommand@2
displayName: 'NuGet restore NLua.UWP'
inputs:
restoreSolution: NLua.UWP.sln
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
......@@ -165,7 +171,7 @@ jobs:
displayName: 'PreBuild Script'
inputs:
filePath: './devops/PreBuild.ps1'
arguments: 'NLua NLua.nuspec'
arguments: 'NLua'
errorActionPreference: 'silentlyContinue'
pwsh: true
......@@ -175,6 +181,13 @@ jobs:
solution: 'NLua.sln'
configuration: Release
- task: MSBuild@1
displayName: 'Build UWP'
inputs:
solution: 'NLua.UWP.sln'
configuration: Release
msbuildArguments: /restore
- task: MSBuild@1
displayName: 'Build .NET Core'
inputs:
......@@ -262,7 +275,8 @@ jobs:
inputs:
targetType: filePath
filePath: ./devops/Package.ps1
arguments: 'NLua NLua.nuspec'
arguments: 'NLua'
pwsh: true
- script: 'rename *.nupkg NLua.nupkg'
displayName: 'Rename Nuget Package'
......@@ -279,6 +293,7 @@ jobs:
targetType: filePath
filePath: ./devops/Publish.ps1
arguments: NLua
pwsh: true
- template: send-telegram.yml@templates
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Copyright (c) 2019 Vinicius Jarina (viniciusjarina@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copyright (c) 2019 Vinicius Jarina (viniciusjarina@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This target file was inspired by SkiaSharp one, it will be used to copy the native Lua dll to the output directory -->
<!-- if ShouldIncludeNativeLua == False then don't include the native lua53 -->
<PropertyGroup>
<ShouldIncludeNativeLua Condition=" '$(ShouldIncludeNativeLua)' == '' ">True</ShouldIncludeNativeLua>
</PropertyGroup>
<!-- get the preferred architecture -->
<PropertyGroup>
<!-- handle x86/x64 specifically -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and ( '$(PlatformTarget)' == 'x64' or '$(PlatformTarget)' == 'x86' ) ">$(PlatformTarget)</PreferredNativeLua>
<!-- handle Any CPU, considering Prefer32Bit -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and '$(Prefer32Bit)' == 'False' ">x64</PreferredNativeLua>
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and '$(Prefer32Bit)' == 'True' ">x86</PreferredNativeLua>
<!-- fall back to x64 on 64-bit machines -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and $([System.Environment]::Is64BitOperatingSystem) ">x64</PreferredNativeLua>
<!-- fall back to x86 -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' ">x86</PreferredNativeLua>
</PropertyGroup>
<!-- get the preferred paths -->
<PropertyGroup>
<PreferredWindowsNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(PreferredNativeLua)\native\lua53.dll</PreferredWindowsNativeLuaPath>
<PreferredOSXNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\osx\native\liblua53.dylib</PreferredOSXNativeLuaPath>
<PreferredLinuxNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\linux-$(PreferredNativeLua)\native\liblua53.so</PreferredLinuxNativeLuaPath>
</PropertyGroup>
<ItemGroup Condition=" '$(ShouldIncludeNativeLua)' != 'False' ">
<None Include="$(PreferredWindowsNativeLuaPath)" Condition=" Exists('$(PreferredWindowsNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredWindowsNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(PreferredOSXNativeLuaPath)" Condition=" Exists('$(PreferredOSXNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredOSXNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(PreferredLinuxNativeLuaPath)" Condition=" Exists('$(PreferredLinuxNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredLinuxNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- a special case for Any CPU -->
<ItemGroup Condition=" '$(ShouldIncludeNativeLua)' != 'False' and ( '$(PlatformTarget)' != 'x64' and '$(PlatformTarget)' != 'x86' ) ">
<!-- Windows -->
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\lua53.dll"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\lua53.dll')">
<Link>x86\lua53.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\lua53.dll"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\lua53.dll')">
<Link>x64\lua53.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<!-- Linux -->
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x86\native\native\liblua53.so"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\linux-x86\native\liblua53.so')">
<Link>x86\liblua53.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x64\native\liblua53.so"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\linux-x64\native\liblua53.so')">
<Link>x64\liblua53.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This target file was inspired by SkiaSharp one, it will be used to copy the native Lua dll to the output directory -->
<!-- if ShouldIncludeNativeLua == False then don't include the native lua53 -->
<PropertyGroup>
<ShouldIncludeNativeLua Condition=" '$(ShouldIncludeNativeLua)' == '' ">True</ShouldIncludeNativeLua>
</PropertyGroup>
<!-- get the preferred architecture -->
<PropertyGroup>
<!-- handle x86/x64 specifically -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and ( '$(PlatformTarget)' == 'x64' or '$(PlatformTarget)' == 'x86' ) ">$(PlatformTarget)</PreferredNativeLua>
<!-- handle Any CPU, considering Prefer32Bit -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and '$(Prefer32Bit)' == 'False' ">x64</PreferredNativeLua>
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and '$(Prefer32Bit)' == 'True' ">x86</PreferredNativeLua>
<!-- fall back to x64 on 64-bit machines -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' and $([System.Environment]::Is64BitOperatingSystem) ">x64</PreferredNativeLua>
<!-- fall back to x86 -->
<PreferredNativeLua Condition=" '$(PreferredNativeLua)' == '' ">x86</PreferredNativeLua>
</PropertyGroup>
<!-- get the preferred paths -->
<PropertyGroup>
<PreferredWindowsNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(PreferredNativeLua)\native\lua53.dll</PreferredWindowsNativeLuaPath>
<PreferredOSXNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\osx\native\liblua53.dylib</PreferredOSXNativeLuaPath>
<PreferredLinuxNativeLuaPath>$(MSBuildThisFileDirectory)..\..\runtimes\linux-$(PreferredNativeLua)\native\liblua53.so</PreferredLinuxNativeLuaPath>
</PropertyGroup>
<ItemGroup Condition=" '$(ShouldIncludeNativeLua)' != 'False' ">
<None Include="$(PreferredWindowsNativeLuaPath)" Condition=" Exists('$(PreferredWindowsNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredWindowsNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(PreferredOSXNativeLuaPath)" Condition=" Exists('$(PreferredOSXNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredOSXNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(PreferredLinuxNativeLuaPath)" Condition=" Exists('$(PreferredLinuxNativeLuaPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredLinuxNativeLuaPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- a special case for Any CPU -->
<ItemGroup Condition=" '$(ShouldIncludeNativeLua)' != 'False' and ( '$(PlatformTarget)' != 'x64' and '$(PlatformTarget)' != 'x86' ) ">
<!-- Windows -->
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\lua53.dll"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\lua53.dll')">
<Link>x86\lua53.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\lua53.dll"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\lua53.dll')">
<Link>x64\lua53.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<!-- Linux -->
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x86\native\native\liblua53.so"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\linux-x86\native\liblua53.so')">
<Link>x86\liblua53.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x64\native\liblua53.so"
Condition="Exists('$(MSBuildThisFileDirectory)..\..\runtimes\linux-x64\native\liblua53.so')">
<Link>x64\liblua53.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment