Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Commit

Permalink
Add nuget publish
Browse files Browse the repository at this point in the history
  • Loading branch information
fredeil committed Mar 10, 2019
1 parent edbded2 commit e2f229b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
28 changes: 28 additions & 0 deletions nuget/FuzzyMatch.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<AssemblyName>FuzzyMatcher</AssemblyName>
<IsPackable>true</IsPackable>
<PackageId>FuzzyMatcher</PackageId>
<Version>0.1.0</Version>

<Owners>Fredrik Eilertsen</Owners>
<Authors>Fredrik Eilertsen</Authors>
<RepositoryType>git</RepositoryType>
<NeutralLanguage>en</NeutralLanguage>
<Copyright>© Fredrik Eilertsen.</Copyright>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<PackageTags>dotnetcore;fuzzy-match;jaro-distance</PackageTags>
<RepositoryUrl>https://github.com/fredeil/FuzzyMatcher/</RepositoryUrl>
<PackageProjectUrl>https://github.com/fredeil/FuzzyMatcher/</PackageProjectUrl>
<Summary>Fuzzy matcher for finding suggestions to words</Summary>
<Description>Fuzzy-matching using Jaro-Winkler distance to calculate similarities between two strings.</Description>
<PackageReleaseNotes>See: https://github.com/fredeil/FuzzyMatcher/releases</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<Compile Include="../FuzzyMatcher.fs" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions nuget/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$ErrorActionPreference = "Stop"

# Find MSBuild on this machine
if ($IsMacOS) {
$msbuild = "msbuild"
} else {
$vswhere = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'
$msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
$msbuild = join-path $msbuild 'MSBuild\15.0\Bin\MSBuild.exe'
}

Write-Output "Using MSBuild from: $msbuild"

# Build the project
& $msbuild "./" /restore /t:Build /p:Configuration=Release /p:Deterministic=false
if ($lastexitcode -ne 0) { exit $lastexitcode; }

# Create the stable NuGet package
& $msbuild "./" /t:Pack /p:Configuration=Release /p:Deterministic=false
if ($lastexitcode -ne 0) { exit $lastexitcode; }

# Copy everything into the output folder
Copy-Item "./bin/Release" "./Artifacts" -Recurse -Force

exit $lastexitcode;
5 changes: 5 additions & 0 deletions nuget/publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Write-Output "Publishing Artifacts to nuget .."

$artifact = Get-ChildItem .\Artifacts\*.nupkg

dotnet nuget push $artifact

0 comments on commit e2f229b

Please sign in to comment.