Skip to content

Instantly share code, notes, and snippets.

View pascalberger's full-sized avatar

Pascal Berger pascalberger

View GitHub Profile
@baywet
baywet / FeatureVersionIncrementer.ps1
Last active August 17, 2016 08:15
adding support of incrementation of upgrade ranges
[System.Reflection.Assembly]::Load("Microsoft.VisualStudio.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
[System.Reflection.Assembly]::Load("Microsoft.VisualStudio.SharePoint.Designers.Models.Features, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
$featureFiles = get-childitem -Filter "*.feature" -Recurse;
$featureTemplateFiles = get-childitem -Filter "*.Template.xml" -Recurse | Where-Object {$_.Directory.Name -ne "Package"}
$featureRegex = [Regex]"(?<buildnumber>\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4})";
$templateRegex = [Regex]'EndVersion=\"(?<buildnumber>\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4})\"';
function getVersionObject($stringVersion)
{