Skip to content

Instantly share code, notes, and snippets.

@toddb
toddb / Install.bat
Created August 9, 2011 21:53
Sample install.bat for psake with environment handin
@echo off
echo.
echo Running as:
whoami
echo.
set application=%1
if NOT '%application%'=='' GOTO :environmentcheck
@toddb
toddb / here.cmd
Created August 9, 2011 21:52
Here.cmd for powershell, psake and msbuild
@echo off
path = %path%;%WINDIR%\Microsoft.NET\Framework\v4.0.30319\
powershell -ExecutionPolicy Unrestricted -NoExit -Command " &{import-module .\scripts\psake.psm1; Invoke-Psake -docs}"
@toddb
toddb / build-tasks.ps1
Created August 9, 2011 06:34
Build tasks for powershell via psake
<#
Basic build tasks for SharePoint (or other projects) - using 7zip and GacUtil
$framework = '4.0x64'
. .\scripts\build-tasks.ps1
properties {
$project = "Sites"
@toddb
toddb / test-tasks.ps1
Created August 9, 2011 06:30
Test tasks for Gallio in powershell with psake - helps with unit, integration and system tests
<#
Usage for Gallio tests:
Task Test-System -Description "Runs the system tests via Gallio" {
Test-Gallio $proj $configuration $platform $dll "system" "Test.System"
# Test-Gallio ".\src\Test.Unit\Test.Unit.csproj" Release x64 ".\src\Test.Unit\bin\Release\x64\Test.Unit.dll" "unit"
}
}
#>
@toddb
toddb / migrations-tasks.ps1
Created August 3, 2011 21:41
Migrations powershell functions for psake that wrap Migratordotnet SharePoint migrations
<#
Basic migration tasks for SharePoint.
$framework = '3.5x64'
. .\scripts\migrations-tasks.ps1
Properties {
$application = "http://mysites"
$migrationsAssembly = "$base_dir\lib\migratordotnet\Infrastructure.dll"
$to = -1
<#
Basic tasks for SharePoint. These wrap many powershell commandlets which littles bits and pieces that actually work. They
are particularly designed for reuse with psake scripts. Belows is a sample psake script for deploying a sharepoint.
For building and package see: . .\scripts\build-tasks.ps1 # see gist: https://gist.github.com/1108813
$framework = '3.5x64'
. .\scripts\sharepoint-tasks.ps1
Properties {