Skip to content

Commit ff5685f

Browse files
committed
upgrade/simplify nuget generation
1 parent f450eb5 commit ff5685f

3 files changed

Lines changed: 50 additions & 55 deletions

File tree

nuget/pack.ps1

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1-
######NuGet.CommandLine is too old and does not support Xamarin.iOS libs
2-
#####Please install the package "NuGe t.CommandLine" from https://chocolatey.org/ before running this script
3-
#####After chocolatey is installed, type: choco install NuGet.CommandLine
4-
#####Before running this script, download nuget.exe from @echo https://nuget.codeplex.com/releases/view/133091
5-
#####and put nuget.exe in the path.
6-
7-
#####set /p nugetServer=Enter base nuget server url (with /):
81
$nugetServer="https://www.nuget.org"
2+
if ($IsMacOS) {
3+
$msbuild = "msbuild"
4+
} else {
5+
$vswhere = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'
6+
$msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
7+
$msbuild = join-path $msbuild 'MSBuild\Current\Bin\MSBuild.exe'
8+
}
9+
$version="2.0.2"
10+
$versionSuffix=""
911

1012
#####################
1113
#Build release config
12-
cd ..
13-
$msbuild = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe'
14-
nuget restore
15-
$msbuildparams = '/t:Clean;Build', '/p:Configuration=Release', '/p:Platform=Any CPU', 'SQLite.Net.sln'
16-
& $msbuild $msbuildparams
17-
cd nuget
18-
14+
cd $PSScriptRoot
1915
del *.nupkg
16+
& $msbuild "../SQLite.Net.sln" /restore /p:Configuration=Release /p:Platform="Any CPU" /p:Version="$version" /p:VersionSuffix="$versionSuffix" /p:Deterministic=false /p:PackageOutputPath="$PSScriptRoot" --% /t:Clean;Build;Pack
17+
if ($lastexitcode -ne 0) { exit $lastexitcode; }
2018

21-
$version="2.0.2"
22-
nuget pack "sqlite-net2.nuspec" -Version $version
2319
nuget push "sqlite-net2.$version.nupkg" -Source $nugetServer
24-
25-
#####set assembly info to version
26-
#####https://gist.github.com/derekgates/4678882

nuget/sqlite-net2.nuspec

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/SQLite.Net/SQLite.Net2.csproj

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,49 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<AssemblyName>SQLite.Net2</AssemblyName>
66
<RootNamespace>SQLite.Net2</RootNamespace>
7+
8+
<DebugType>portable</DebugType>
9+
<AssemblyProduct>SQLite.Net2</AssemblyProduct>
10+
<AssemblyCopyright>Copyright ©2020 Benjamin Mayrargue</AssemblyCopyright>
711
</PropertyGroup>
812

9-
<ItemGroup>
10-
<Folder Include="Properties\" />
11-
</ItemGroup>
13+
<!-- nuget configurable properties -->
14+
<PropertyGroup>
15+
<Version>0.0.0-pre1</Version>
16+
<VersionSuffix></VersionSuffix>
17+
<DefineConstants>$(DefineConstants);</DefineConstants>
18+
<NugetPackageId></NugetPackageId>
19+
</PropertyGroup>
20+
21+
22+
<!-- nuget properties -->
23+
<PropertyGroup>
24+
<PackageId>sqlite-net2</PackageId>
25+
<!-- PackageIcon>icon.png</PackageIcon -->
26+
<!--<PackageIconUrl>https://raw.githubusercontent.com/xamarin/Essentials/master/Assets/xamarin.essentials_128x128.png</PackageIconUrl>-->
27+
<Summary>A netstandard client library to access SQLite database files in a LINQ manner.</Summary>
28+
<PackageTags>sqlite, xamarin, android, ios, uwp, netstandard</PackageTags>
29+
<Title>sqlite-net2 light ORM for SQLite</Title>
30+
<Description>sqlite-net2 allows applications to manage data in SQLite databases using Entity Framework like queries, but much lighter</Description>
31+
<Product>$(AssemblyName) ($(TargetFramework))</Product>
32+
<VersionSuffix></VersionSuffix>
33+
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
34+
<Authors>Benjamin Mayrargue</Authors>
35+
<Owners>Benjamin Mayrargue</Owners>
36+
<NeutralLanguage>en</NeutralLanguage>
37+
<RepositoryUrl>https://github.com/softlion/SQLite.Net-PCL2</RepositoryUrl>
38+
<UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
39+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
40+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
41+
<PackageProjectUrl>https://github.com/softlion/SQLite.Net-PCL2</PackageProjectUrl>
42+
<PackageReleaseNotes>
43+
https://github.com/softlion/SQLite.Net-PCL/commits
44+
</PackageReleaseNotes>
45+
</PropertyGroup>
1246

1347
<ItemGroup>
1448
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.0.2" />
49+
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="" />
1550
</ItemGroup>
1651

1752
</Project>

0 commit comments

Comments
 (0)