Skip to content

Commit

Permalink
Added NuGet build toolings
Browse files Browse the repository at this point in the history
  • Loading branch information
soen committed Nov 27, 2016
1 parent 2f0ab27 commit 04ef4ef
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/Conjunction.nuget/Conjunction.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Conjunction.Foundation.Core</id>
<version>$version$</version>
<authors>Søren Engel</authors>
<owners>Søren Engel</owners>
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
<projectUrl>https://github.com/soen/Conjunction</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Core functionalities required to use Conjunction. Conjunction is a utility for Sitecore that solves the issue of creating configurable and personalizable queries for either the Lucene or Solr search engine, using Sitecore's ContentSearch API as the backbone.</description>
<copyright>Copyright 2016</copyright>
<tags>sitecore contentsearch</tags>
<dependencies>
<dependency id="Conjunction.Foundation.Core" version="$version$" />
</dependencies>
</metadata>
<files>
</files>
</package>
4 changes: 4 additions & 0 deletions build/PackageNuGet.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ECHO off
SET scriptRoot=%~dp0

powershell.exe -ExecutionPolicy Unrestricted -NoExit .\PackageNuGet.ps1 %scriptRoot%
17 changes: 17 additions & 0 deletions build/PackageNuGet.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
param($scriptRoot)

$ErrorActionPreference = "Stop"

$programFilesx86 = ${Env:ProgramFiles(x86)}
$msBuild = "$programFilesx86\MSBuild\14.0\bin\msbuild.exe"
$nuGet = "$scriptRoot..\tools\NuGet.exe"
$solution = "$scriptRoot\..\Conjunction.sln"

& $nuGet restore $solution
& $msBuild $solution /p:Configuration=Release /t:Rebuild /m

$ConjunctionAssembly = Get-Item "$scriptRoot\..\src\Foundation\Core\Code\bin\Conjunction.Foundation.Core.dll" | Select-Object -ExpandProperty VersionInfo
$targetAssemblyVersion = $ConjunctionAssembly.ProductVersion

& $nuGet pack "$scriptRoot\Conjunction.nuget\Conjunction.nuspec" -version $targetAssemblyVersion
& $nuGet pack "$scriptRoot\..\src\Foundation\Core\Code\Conjunction.Foundation.Core.csproj" -Symbols -Prop "Configuration=Release"
Binary file added tools/NuGet.exe
Binary file not shown.

0 comments on commit 04ef4ef

Please sign in to comment.