mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
Update for nuget
This commit is contained in:
@@ -354,3 +354,5 @@ MigrationBackup/
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
UVtools.Platforms/linux-x64/libcvextern.so
|
||||
|
||||
build/nuget_api.key
|
||||
@@ -1,9 +1,11 @@
|
||||
# UVtools
|
||||
|
||||
[](https://github.com/sn4k3/UVtools/blob/master/LICENSE)
|
||||
[](https://github.com/sn4k3/UVtools)
|
||||
[](https://github.com/sn4k3/UVtools/releases)
|
||||
[](https://github.com/sn4k3/UVtools/releases)
|
||||
[](https://github.com/sn4k3/UVtools/blob/master/LICENSE)
|
||||
[](https://github.com/sn4k3/UVtools)
|
||||
[](https://github.com/sn4k3/UVtools)
|
||||
[](https://github.com/sn4k3/UVtools/releases)
|
||||
[](https://github.com/sn4k3/UVtools/releases)
|
||||
[](https://www.nuget.org/packages/UVtools.Core)
|
||||
|
||||
**MSLA/DLP, file analysis, calibration, repair, conversion and manipulation**
|
||||
|
||||
@@ -408,7 +410,14 @@ There are multiple ways to open your file:
|
||||
|
||||
# Library -> Developers
|
||||
|
||||
Are you a developer? This project include a .NET 5.0 library (UVtools.Core) that can be referenced in your application to make use of my work. Easy to use calls that allow you work with the formats. For more information navigate main code.
|
||||
Are you a developer?
|
||||
This project include a .NET 5.0 library (UVtools.Core) that can be referenced in your application to make use of my work.
|
||||
Easy to use calls that allow you work with the formats. For more information navigate main code to see some calls.
|
||||
|
||||
Nuget package: https://www.nuget.org/packages/UVtools.Core
|
||||
```powershell
|
||||
dotnet add package UVtools.Core
|
||||
```
|
||||
|
||||
## Develop and build from Source
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<PackageIcon>UVtools.png</PackageIcon>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<PackageIconUrl />
|
||||
<PackageTags>msla, dlp, resin, printer, slicer, 3d printing, image processing, layers</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -39,7 +41,7 @@
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
<None Include="..\UVtools.GUI\UVtools.png">
|
||||
<None Include="..\UVtools.CAD\UVtools.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
|
||||
@@ -35,6 +35,7 @@ Set-Location $PSScriptRoot\..
|
||||
$enableMSI = $true
|
||||
#$buildOnly = 'linux-x64'
|
||||
#$buildOnly = 'win-x64'
|
||||
$enableNugetPublish = $true
|
||||
# Profilling
|
||||
$stopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
|
||||
$deployStopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
|
||||
@@ -130,6 +131,29 @@ $runtimes =
|
||||
#Invoke-WebRequest -Uri $appImageUrl -OutFile $appImageFilePath
|
||||
#wsl chmod a+x $appImageFilePath
|
||||
|
||||
if($null -ne $enableNugetPublish -and $enableNugetPublish)
|
||||
{
|
||||
$nugetApiKeyFile = 'build/nuget_api.key'
|
||||
if (Test-Path -Path $nugetApiKeyFile -PathType Leaf)
|
||||
{
|
||||
Write-Output "Creating nuget package"
|
||||
dotnet pack UVtools.Core --configuration 'Release'
|
||||
|
||||
$nupkg = "UVtools.Core/bin/Release/UVtools.Core.$version.nupkg"
|
||||
|
||||
if (Test-Path -Path $nupkg -PathType Leaf){
|
||||
$nugetApiKeyFile = (Get-Content $nugetApiKeyFile)
|
||||
dotnet nuget push $nupkg --api-key $nugetApiKeyFile --source https://api.nuget.org/v3/index.json
|
||||
#Remove-Item $nupkg
|
||||
}else {
|
||||
Write-Error "Nuget package publish failed!"
|
||||
Write-Error "File '$nupkg' was not found"
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
foreach ($obj in $runtimes.GetEnumerator()) {
|
||||
if(![string]::IsNullOrWhiteSpace($buildOnly) -and !$buildOnly.Equals($obj.Name)) {continue}
|
||||
# Configuration
|
||||
@@ -228,7 +252,7 @@ $stopWatch.Stop()
|
||||
#>
|
||||
|
||||
# MSI Installer for Windows
|
||||
if($enableMSI)
|
||||
if($null -ne $enableMSI -and $enableMSI)
|
||||
{
|
||||
$deployStopWatch.Restart()
|
||||
$runtime = 'win-x64'
|
||||
|
||||
Reference in New Issue
Block a user