Permalink
Browse files

Created chocolatey installer

  • Loading branch information...
1 parent ea6206f commit c40505c7cb497adcb9d90dfcca6377db43a34c90 @JakeGinnivan JakeGinnivan committed Mar 13, 2012
Showing with 41 additions and 26 deletions.
  1. +2 −1 .gitignore
  2. +3 −1 build.cmd
  3. +5 −1 build.proj
  4. +4 −23 src/Pretzel/Properties/AssemblyInfo.cs
  5. +14 −0 tools/chocolatey/pretzel.nuspec
  6. +13 −0 tools/chocolatey/tools/chocolateyInstall.ps1
View
@@ -15,4 +15,5 @@ artifacts/
post-build*
_ReSharper.*
deploy-to-ec2*
-TestResults/
+TestResults/
+build/
View
@@ -4,4 +4,6 @@ if "%config%" == "" (
set config=Debug
)
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.proj /p:Configuration="%config%" /t:Test /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.proj /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
+
+pause
View
@@ -22,7 +22,11 @@
</Target>
<Target Name="Chocolatey" DependsOnTargets="Test">
-
+ <Message Text="$(MSBuildProjectDirectory)\src\Packages\NuGet.CommandLine.*\tools\NuGet.exe" />
+ <ItemGroup>
+ <NuGet Include="$(MSBuildProjectDirectory)\src\Packages\NuGet.CommandLine.*\tools\NuGet.exe" />
+ </ItemGroup>
+ <Exec Command="@(NuGet) pack $(MSBuildProjectDirectory)\tools\chocolatey\pretzel.nuspec -OutputDirectory $(MSBuildProjectDirectory)\build" />
</Target>
</Project>
@@ -1,36 +1,17 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
+using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("Pretzel")]
[assembly: AssemblyDescription("A simple static site generator for Windows")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code52")]
[assembly: AssemblyProduct("Pretzel")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyCopyright("Copyright © Code52 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3c5a833b-daac-49ef-bba8-1000cd0e3c4f")]
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <metadata>
+ <id>pretzel</id>
+ <version>0.1.0</version>
+ <title>Pretzel</title>
+ <authors>Code52</authors>
+ <owners>Code52</owners>
+ <projectUrl>https://github.com/Code52/pretzel</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>A simple, pluggable site generation tool for .NET developers and Windows users</description>
+ <tags>Jekyll Liquid Razor Markdown</tags>
+ </metadata>
+</package>
@@ -0,0 +1,13 @@
+try {
+ $sysDrive = $env:SystemDrive
+ $pretzelPath = "$sysDrive\tools\pretzel"
+
+ Install-ChocolateyZipPackage 'Pretzel' 'https://github.com/downloads/Code52/pretzel/Pretzel-0.1.0.zip' $pretzelPath
+ Install-ChocolateyPath $pretzelPath
+
+ write-host 'pretzel has been installed.'
+ Write-ChocolateySuccess 'pretzel'
+} catch {
+ Write-ChocolateyFailure 'pretzel' $($_.Exception.Message)
+ throw
+}

0 comments on commit c40505c

Please sign in to comment.