diff --git a/.gitignore b/.gitignore index 8a30d25..81408c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/registry/ + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## diff --git a/Scintilla.NET.TestApp/Scintilla.NET.TestApp.csproj b/Scintilla.NET.TestApp/Scintilla.NET.TestApp.csproj index 6c1d331..09b4a9f 100644 --- a/Scintilla.NET.TestApp/Scintilla.NET.TestApp.csproj +++ b/Scintilla.NET.TestApp/Scintilla.NET.TestApp.csproj @@ -70,7 +70,7 @@ SettingsSingleFileGenerator Settings.Designer.cs - + True Settings.settings diff --git a/Scintilla.NET.sln b/Scintilla.NET.sln index f526545..fcd6139 100644 --- a/Scintilla.NET.sln +++ b/Scintilla.NET.sln @@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Scintilla.NET", "Scintilla.NET\Scintilla.NET.csproj", "{22AE2386-60F1-476E-9303-61CDB0AAC4CF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Scintilla.NET.TestApp", "Scintilla.NET.TestApp\Scintilla.NET.TestApp.csproj", "{F25685EC-098A-4080-95A9-445268609806}" + ProjectSection(ProjectDependencies) = postProject + {22AE2386-60F1-476E-9303-61CDB0AAC4CF} = {22AE2386-60F1-476E-9303-61CDB0AAC4CF} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE874649-2B00-415E-8C80-82A42D949696}" ProjectSection(SolutionItems) = preProject diff --git a/Scintilla.NET/Scintilla.NET.csproj b/Scintilla.NET/Scintilla.NET.csproj index 47c04f6..4bd465c 100644 --- a/Scintilla.NET/Scintilla.NET.csproj +++ b/Scintilla.NET/Scintilla.NET.csproj @@ -143,4 +143,7 @@ PreserveNewest + + + diff --git a/Scintilla.NET/nupkg.ps1 b/Scintilla.NET/nupkg.ps1 new file mode 100644 index 0000000..28fd1ec --- /dev/null +++ b/Scintilla.NET/nupkg.ps1 @@ -0,0 +1,23 @@ +param ( + [Parameter(Mandatory=$true)][string]$NuGetPackageRoot, + [Parameter(Mandatory=$true)][string]$PackageOutputPath, + [Parameter(Mandatory=$true)][string]$PackageId, + [Parameter(Mandatory=$true)][string]$PackageVersion +) + +$PackageVersionList = $PackageVersion.Split('.') + +if ($PackageVersionList.Count -Eq 4 -And [int]::Parse($PackageVersionList[3]) -Eq 0) { + $PackageVersion = [string]::Join('.', $PackageVersionList[0..2]) +} + +$LocalNuGetPackageRegistry = [System.IO.Path]::GetFullPath((Join-Path $NuGetPackageRoot ..\registry)) +$PackagePath = Join-Path $PackageOutputPath "$PackageId.$PackageVersion.nupkg" + +$PackageInRegistry = Join-Path $LocalNuGetPackageRegistry (Join-Path $PackageId $PackageVersion) +$PackageInRoot = Join-Path $NuGetPackageRoot (Join-Path $PackageId $PackageVersion) + +Remove-Item $PackageInRegistry -Recurse -Force -ErrorAction Ignore +Remove-Item $PackageInRoot -Recurse -Force -ErrorAction Ignore + +nuget add $PackagePath -Source $LocalNuGetPackageRegistry diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..878818e --- /dev/null +++ b/nuget.config @@ -0,0 +1,6 @@ + + + + + +