Merge remote-tracking branch 'origin/dev-v7' into dev-v7.7
This commit is contained in:
30
build/Modules/Umbraco.Build/Set-UmbracoContinuousVersion.ps1
Normal file
30
build/Modules/Umbraco.Build/Set-UmbracoContinuousVersion.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# Set-UmbracoContinuousVersion
|
||||
# Sets the Umbraco version for continuous integration
|
||||
#
|
||||
# -Version <version>
|
||||
# where <version> is a Semver valid version
|
||||
# eg 1.2.3, 1.2.3-alpha, 1.2.3-alpha+456
|
||||
#
|
||||
# -BuildNumber <buildNumber>
|
||||
# where <buildNumber> is a string coming from the build server
|
||||
# eg 34, 126, 1
|
||||
#
|
||||
function Set-UmbracoContinuousVersion
|
||||
{
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]
|
||||
$version,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]
|
||||
$buildNumber
|
||||
)
|
||||
|
||||
Write-Host "Version is currently set to $version"
|
||||
|
||||
$umbracoVersion = "$($version.Trim())-alpha$($buildNumber)"
|
||||
Write-Host "Setting Umbraco Version to $umbracoVersion"
|
||||
|
||||
Set-UmbracoVersion $umbracoVersion
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
. "$PSScriptRoot\Get-UmbracoBuildEnv.ps1"
|
||||
. "$PSScriptRoot\Set-UmbracoVersion.ps1"
|
||||
. "$PSScriptRoot\Set-UmbracoContinuousVersion.ps1"
|
||||
. "$PSScriptRoot\Get-UmbracoVersion.ps1"
|
||||
. "$PSScriptRoot\Verify-NuGet.ps1"
|
||||
|
||||
@@ -519,7 +520,7 @@ function Build-Umbraco
|
||||
if ($target -eq "pre-build")
|
||||
{
|
||||
Prepare-Build $uenv
|
||||
Compile-Belle $uenv $version
|
||||
#Compile-Belle $uenv $version
|
||||
|
||||
# set environment variables
|
||||
$env:UMBRACO_VERSION=$version.Semver.ToString()
|
||||
@@ -595,6 +596,7 @@ function Build-Umbraco
|
||||
#
|
||||
Export-ModuleMember -function Get-UmbracoBuildEnv
|
||||
Export-ModuleMember -function Set-UmbracoVersion
|
||||
Export-ModuleMember -function Set-UmbracoContinuousVersion
|
||||
Export-ModuleMember -function Get-UmbracoVersion
|
||||
Export-ModuleMember -function Build-Umbraco
|
||||
Export-ModuleMember -function Build-UmbracoDocs
|
||||
|
||||
@@ -961,10 +961,23 @@ namespace Umbraco.Core.Services
|
||||
/// <returns>True if the Content can be published, otherwise False</returns>
|
||||
public bool IsPublishable(IContent content)
|
||||
{
|
||||
// get ids from path
|
||||
// skip the first one that has to be -1 - and we don't care
|
||||
// skip the last one that has to be "this" - and it's ok to stop at the parent
|
||||
var ids = content.Path.Split(',').Skip(1).SkipLast().Select(int.Parse).ToArray();
|
||||
int[] ids;
|
||||
if (content.HasIdentity)
|
||||
{
|
||||
// get ids from path (we have identity)
|
||||
// skip the first one that has to be -1 - and we don't care
|
||||
// skip the last one that has to be "this" - and it's ok to stop at the parent
|
||||
ids = content.Path.Split(',').Skip(1).SkipLast().Select(int.Parse).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
// no path yet (no identity), have to move up to parent
|
||||
// skip the first one that has to be -1 - and we don't care
|
||||
// don't skip the last one that is "parent"
|
||||
var parent = GetById(content.ParentId);
|
||||
if (parent == null) return false;
|
||||
ids = parent.Path.Split(',').Skip(1).Select(int.Parse).ToArray();
|
||||
}
|
||||
if (ids.Length == 0)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Umbraco.Core.Xml
|
||||
return -1;
|
||||
});
|
||||
|
||||
const string rootXpath = "descendant::*[@id={0}]";
|
||||
const string rootXpath = "id({0})";
|
||||
|
||||
//parseable items:
|
||||
var vars = new Dictionary<string, Func<string, string>>();
|
||||
|
||||
Reference in New Issue
Block a user