Skip to content

Commit

Permalink
Merge pull request #64 from unoplatform/dev/jela/gitversion-update
Browse files Browse the repository at this point in the history
Update gitversion to 5
  • Loading branch information
jeromelaban committed Nov 25, 2019
2 parents fc19037 + d2cbbdb commit 6ef2164
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
6 changes: 6 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ steps:
- checkout: self
clean: true

- task: GitVersion@5
inputs:
useConfigFile: true
configFilePath: GitVersion.yml
updateAssemblyInfo: false

- powershell: './build/build.ps1 -Script build/build.cake'

- task: VSTest@2
Expand Down
24 changes: 4 additions & 20 deletions build/build.cake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#addin "Cake.FileHelpers"
#addin "Cake.Powershell"
#tool "nuget:?package=GitVersion.CommandLine&version=4.0.0"
#addin "nuget:?package=Cake.FileHelpers&version=3.2.1"
#addin "nuget:?package=Cake.Powershell&version=0.4.8"

using System;
using System.Linq;
Expand All @@ -16,7 +15,6 @@ var target = Argument("target", "Default");
// VERSIONS
//////////////////////////////////////////////////////////////////////

var gitVersioningVersion = "2.0.41";
var signClientVersion = "0.9.0";

//////////////////////////////////////////////////////////////////////
Expand All @@ -26,7 +24,6 @@ var signClientVersion = "0.9.0";
var baseDir = MakeAbsolute(Directory("../")).ToString();
var buildDir = baseDir + "/build";
var Solution = baseDir + "/src/Uno.Core.sln";
GitVersion versionInfo = null;

//////////////////////////////////////////////////////////////////////
// METHODS
Expand Down Expand Up @@ -83,7 +80,6 @@ void VerifyHeaders(bool Replace)
//////////////////////////////////////////////////////////////////////

Task("Build")
.IsDependentOn("Version")
.IsDependentOn("ValidateHeaders")
.Description("Build all projects and get the assemblies")
.Does(() =>
Expand All @@ -94,8 +90,8 @@ Task("Build")
{
}
.SetConfiguration("Release")
.WithProperty("PackageVersion", versionInfo.FullSemVer)
.WithProperty("InformationalVersion", versionInfo.InformationalVersion)
.WithProperty("PackageVersion", EnvironmentVariable("GITVERSION_FULLSEMVER"))
.WithProperty("InformationalVersion", EnvironmentVariable("GITVERSION_INFORMATIONALVERSION"))
.WithProperty("PackageOutputPath", buildDir)
.WithTarget("Restore")
.WithTarget("Build")
Expand Down Expand Up @@ -126,18 +122,6 @@ Task("ValidateHeaders")
VerifyHeaders(false);
});

Task("Version")
.Description("Updates target versions")
.Does(() =>
{
versionInfo = GitVersion(new GitVersionSettings {
UpdateAssemblyInfo = true,
UpdateAssemblyInfoFilePath = baseDir + "/build/AssemblyVersion.cs"
});
Information($"FullSemVer: {versionInfo.FullSemVer} Sha: {versionInfo.Sha}");
});

//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion build/tools/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.24.0" />
<package id="Cake" version="0.35.0" />
</packages>
7 changes: 7 additions & 0 deletions gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ branches:
tag: dev
increment: Minor

pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDeployment
tag: PullRequest
increment: Inherit

stable:
regex: release/stable/.*
tag: ''
Expand All @@ -24,6 +30,7 @@ branches:
source-branches: ['master']

dev:
mode: ContinuousDeployment
regex: dev/.*?/(.*?)
tag: dev.{BranchName}
source-branches: ['master', 'release', 'projects', 'feature']
Expand Down

0 comments on commit 6ef2164

Please sign in to comment.