Skip to content

Commit

Permalink
Initial load
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinobee committed May 17, 2013
0 parents commit 217a211
Show file tree
Hide file tree
Showing 70 changed files with 29,935 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

*.jpg binary
*.png binary
*.gif binary

*.cs text=auto diff=csharp
*.vb text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto

*.csproj text=auto merge=union
*.vbproj text=auto merge=union
*.fsproj text=auto merge=union
*.dbproj text=auto merge=union
*.sln text=auto eol=crlf merge=union

# Custom for TDS/Sitecore serialization
*.item -text
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
bin
obj

#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
TestResults

#Project specific ignores
lib/Sitecore.*.dll
lib/ComponentArt.Web.UI.dll
lib/HtmlAgilityPack.dll
lib/ITHit.WebDAV.Server.dll
lib/Lucene.Net.dll
lib/Mvp.Xml.dll
lib/Newtonsoft.Json.dll
lib/RadEditor.Net2.dll
lib/Telerik.Web.UI.dll
lib/

/packages

# Build ignores
/msbuild.log
/artifacts
6 changes: 6 additions & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added .nuget/NuGet.exe
Binary file not shown.
133 changes: 133 additions & 0 deletions .nuget/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>

<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>

<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>

<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>

<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " </RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>

<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>

<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Sitecore.Ship

Sitecore.Ship is a lightweight means to install Sitecore Update packages via HTTP requests.


## Instructions for Use

This is an early proof of concept and as such packages have not been pushed to NuGet.org

### Building the Package

* Clone this repository to your local file system

* You will need to specify the location of your Sitecore assemblies. This can be down in the `build\build.proj` file. Set the LibsSrcPath to where your Sitecore assemblies are located.

* From a command prompt type `.\build` and press Enter

### Installing the Package

Run the following powershell command in the package manager console of the Visual Studio solution for the target website:

install-package Sitecore.Ship -Source <path>

Where <path> is the path to the `artifacts\Packages\Sitecore.Ship.x.x.xxxx.nupkg` that was produced by the build command.

If you wish to remove jthe package run the following command:

uninstall-package Sitecore.Ship

Installing the package will do the following:

* Add a new `packageInstallation` section to your `web.config` file. You can set configuration options in this section to enable remote access to the installer and to enable the package streaming functionality. These options are safe by default, that is, no remote access and package streaming disabled.

* Register a single new HTTP handler section in `<system.web>` and `<system.webserver>`

* Add a `ship.config` Sitecore include file to the `App_Config\include` folder.

### Using the Installer

#### GET Request - File Install

http://domain/install/installer.ashx?package=D:\path_to_update_file\your_package.update

#### POST Request - Package Streaming

Issue a POST request to the HTTP Handler and add upload the update package in the form data as per RFC 1867.

http://domain/install/installer.ashx

References:

http://curl.haxx.se/docs/httpscripting.html - see section 4.3 File Upload POST

The repository comes with a simple console application and a command script to help you stream packages to the installer.

.\artifacts\Build\Ship -p .\yourpackage.update -u http://domain/install/installer.ashx
98 changes: 98 additions & 0 deletions Ship.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F0717179-F14B-4667-8D5A-5980EC935F0F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{33043060-6D33-4018-9F77-A36E70771C93}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
build\Build.proj = build\Build.proj
build\Build.tasks = build\Build.tasks
build\README.md = build\README.md
build\Ship.versions.targets = build\Ship.versions.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{47B95AB0-A787-4853-B9B4-CC16714240A6}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2A29E5BC-9DE1-4299-AFD9-86F1CC77B921}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit test", "unit test", "{923D9377-9025-425B-9698-1A38947CA973}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{BFDC90B2-65F5-4F9E-A49F-9CD8060A2B4B}"
ProjectSection(SolutionItems) = preProject
lib\README.md = lib\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packaging", "packaging", "{05F4023A-A4F6-4844-8175-8D7E04C63913}"
ProjectSection(SolutionItems) = preProject
build\packaging\Ship.nuspec = build\packaging\Ship.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{D11D4F10-B2C8-4E1C-BF78-B192D303D20D}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ship", "src\Ship\Ship.csproj", "{23D132AE-766C-4341-A2F0-7753DADBB0A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ship.Web", "src\Ship.Web\Ship.Web.csproj", "{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ship.Web.Tests", "tests\unit-test\Ship.Web.Tests\Ship.Web.Tests.csproj", "{7F93E9D1-BC72-49BF-A695-45E73ECAE602}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Release|Any CPU.Build.0 = Release|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23D132AE-766C-4341-A2F0-7753DADBB0A0}.Release|x86.ActiveCfg = Release|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Debug|x86.ActiveCfg = Debug|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Release|Any CPU.Build.0 = Release|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42}.Release|x86.ActiveCfg = Release|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Debug|x86.ActiveCfg = Debug|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Release|Any CPU.Build.0 = Release|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7F93E9D1-BC72-49BF-A695-45E73ECAE602}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{23D132AE-766C-4341-A2F0-7753DADBB0A0} = {F0717179-F14B-4667-8D5A-5980EC935F0F}
{021F5803-F1BE-4D28-B2DC-19C7A1A96F42} = {F0717179-F14B-4667-8D5A-5980EC935F0F}
{05F4023A-A4F6-4844-8175-8D7E04C63913} = {33043060-6D33-4018-9F77-A36E70771C93}
{923D9377-9025-425B-9698-1A38947CA973} = {2A29E5BC-9DE1-4299-AFD9-86F1CC77B921}
{7F93E9D1-BC72-49BF-A695-45E73ECAE602} = {923D9377-9025-425B-9698-1A38947CA973}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 217a211

Please sign in to comment.