Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d69f0fe9dd | |||
| d2baf03119 | |||
| ff085c97ce | |||
| ec60ba142a | |||
| a16e31c671 | |||
| d19a23eec6 | |||
| 5b17072d55 | |||
| 51875539b9 | |||
| 030fd4d375 | |||
| 7658fba725 |
@@ -3,57 +3,57 @@
|
||||
[string]$Directory
|
||||
)
|
||||
$workingDirectory = $Directory
|
||||
CD $workingDirectory
|
||||
CD "$($workingDirectory)"
|
||||
|
||||
# Clone repo
|
||||
$fullGitUrl = "https://$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
||||
git clone $fullGitUrl 2>&1 | % { $_.ToString() }
|
||||
$fullGitUrl = "https://$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
||||
git clone $($fullGitUrl) $($env:GIT_REPOSITORYNAME) 2>&1 | % { $_.ToString() }
|
||||
|
||||
# Remove everything so that unzipping the release later will update everything
|
||||
# Don't remove the readme file nor the git directory
|
||||
Write-Host "Cleaning up git directory before adding new version"
|
||||
Remove-Item -Recurse $workingDirectory\$env:GIT_REPOSITORYNAME\* -Exclude README.md,.git
|
||||
Remove-Item -Recurse "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)\*" -Exclude README.md,.git
|
||||
|
||||
# Find release zip
|
||||
$zipsDir = "$workingDirectory\$env:BUILD_DEFINITIONNAME\zips"
|
||||
$zipsDir = "$($workingDirectory)\$($env:BUILD_DEFINITIONNAME)\zips"
|
||||
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
|
||||
Write-Host "Searching for Umbraco release files in $workingDirectory\$zipsDir for a file with pattern $pattern"
|
||||
$file = (Get-ChildItem $zipsDir | Where-Object { $_.Name -match "$pattern" })
|
||||
Write-Host "Searching for Umbraco release files in $($zipsDir) for a file with pattern $($pattern)"
|
||||
$file = (Get-ChildItem "$($zipsDir)" | Where-Object { $_.Name -match "$($pattern)" })
|
||||
|
||||
if($file)
|
||||
{
|
||||
# Get release name
|
||||
$version = [regex]::Match($file.Name, $pattern).captures.groups[1].value
|
||||
$releaseName = "Umbraco $version"
|
||||
Write-Host "Found $releaseName"
|
||||
$version = [regex]::Match($($file.Name), $($pattern)).captures.groups[1].value
|
||||
$releaseName = "Umbraco $($version)"
|
||||
Write-Host "Found $($releaseName)"
|
||||
|
||||
# Unzip into repository to update release
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
Write-Host "Unzipping $($file.FullName) to $workingDirectory\$env:GIT_REPOSITORYNAME"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$workingDirectory\$env:GIT_REPOSITORYNAME")
|
||||
Write-Host "Unzipping $($file.FullName) to $($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)")
|
||||
|
||||
# Telling git who we are
|
||||
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
|
||||
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
|
||||
|
||||
# Commit
|
||||
CD $env:GIT_REPOSITORYNAME
|
||||
Write-Host "Committing Umbraco $version Release from Build Output"
|
||||
CD "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
||||
Write-Host "Committing Umbraco $($version) Release from Build Output"
|
||||
|
||||
git add . 2>&1 | % { $_.ToString() }
|
||||
git commit -m " Release $releaseName from Build Output" 2>&1 | % { $_.ToString() }
|
||||
git commit -m " Release $($releaseName) from Build Output" 2>&1 | % { $_.ToString() }
|
||||
|
||||
# Tag the release
|
||||
git tag -a "v$version" -m "v$version"
|
||||
git tag -a "v$($version)" -m "v$($version)"
|
||||
|
||||
# Push release to master
|
||||
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$GitHubPersonalAccessToken@$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
||||
git push $fullGitAuthUrl 2>&1 | % { $_.ToString() }
|
||||
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$($GitHubPersonalAccessToken)@$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
||||
git push $($fullGitAuthUrl) 2>&1 | % { $_.ToString() }
|
||||
|
||||
#Push tag to master
|
||||
git push $fullGitAuthUrl --tags 2>&1 | % { $_.ToString() }
|
||||
git push $($fullGitAuthUrl) --tags 2>&1 | % { $_.ToString() }
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Error "Umbraco release file not found, searched in $workingDirectory\$zipsDir for a file with pattern $pattern - cancelling"
|
||||
Write-Error "Umbraco release file not found, searched in $($workingDirectory)\$($zipsDir) for a file with pattern $($pattern) - canceling"
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,5 +11,5 @@ using System.Resources;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyFileVersion("7.13.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.13.0")]
|
||||
[assembly: AssemblyFileVersion("7.13.1")]
|
||||
[assembly: AssemblyInformationalVersion("7.13.1")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("7.13.0");
|
||||
private static readonly Version Version = new Version("7.13.1");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -365,7 +365,8 @@ namespace Umbraco.Core.IO
|
||||
{
|
||||
var jpgInfo = ImageFile.FromStream(stream);
|
||||
|
||||
if (jpgInfo.Format != ImageFileFormat.Unknown
|
||||
if (jpgInfo != null
|
||||
&& jpgInfo.Format != ImageFileFormat.Unknown
|
||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
|
||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
|
||||
{
|
||||
|
||||
@@ -118,9 +118,9 @@ namespace Umbraco.Core.Media.Exif
|
||||
/// <param name="encoding">The encoding to be used for text metadata when the source encoding is unknown.</param>
|
||||
/// <returns>The <see cref="ImageFile"/> created from the file.</returns>
|
||||
public static ImageFile FromStream(Stream stream, Encoding encoding)
|
||||
{
|
||||
{
|
||||
// JPEG
|
||||
if(JPEGDetector.IsOfType(stream))
|
||||
if (JPEGDetector.IsOfType(stream))
|
||||
{
|
||||
return new JPEGFile(stream, encoding);
|
||||
}
|
||||
@@ -137,8 +137,9 @@ namespace Umbraco.Core.Media.Exif
|
||||
return new SVGFile(stream);
|
||||
}
|
||||
|
||||
throw new NotValidImageFileException ();
|
||||
}
|
||||
// We don't know
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace Umbraco.Core.Media.TypeDetector
|
||||
public static bool IsOfType(Stream fileStream)
|
||||
{
|
||||
var header = GetFileHeader(fileStream);
|
||||
|
||||
return header[0] == 0xff && header[1] == 0xD8;
|
||||
return header != null && header[0] == 0xff && header[1] == 0xD8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,13 @@ namespace Umbraco.Core.Media.TypeDetector
|
||||
public static byte[] GetFileHeader(Stream fileStream)
|
||||
{
|
||||
fileStream.Seek(0, SeekOrigin.Begin);
|
||||
byte[] header = new byte[8];
|
||||
var header = new byte[8];
|
||||
fileStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
// Invalid header
|
||||
if (fileStream.Read(header, 0, header.Length) != header.Length)
|
||||
return null;
|
||||
|
||||
return header;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,17 +7,17 @@ namespace Umbraco.Core.Media.TypeDetector
|
||||
{
|
||||
public static bool IsOfType(Stream fileStream)
|
||||
{
|
||||
string tiffHeader = GetFileHeader(fileStream);
|
||||
|
||||
return tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
||||
var tiffHeader = GetFileHeader(fileStream);
|
||||
return tiffHeader != null && tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
||||
}
|
||||
|
||||
public static string GetFileHeader(Stream fileStream)
|
||||
{
|
||||
var header = RasterizedTypeDetector.GetFileHeader(fileStream);
|
||||
if (header == null)
|
||||
return null;
|
||||
|
||||
string tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
||||
|
||||
var tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
||||
return tiffHeader;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,16 +42,22 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
||||
|
||||
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
||||
{
|
||||
var sourceAsString = source?.ToString();
|
||||
if(sourceAsString.IsNullOrWhiteSpace())
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
|
||||
// if Json storage type deserialzie and return as string array
|
||||
if (JsonStorageType(propertyType.DataTypeId))
|
||||
{
|
||||
var jArray = JsonConvert.DeserializeObject<JArray>(source.ToString());
|
||||
var jArray = JsonConvert.DeserializeObject<JArray>(sourceAsString);
|
||||
return jArray.ToObject<string[]>();
|
||||
}
|
||||
|
||||
// Otherwise assume CSV storage type and return as string array
|
||||
var csvTags =
|
||||
source.ToString()
|
||||
sourceAsString
|
||||
.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToArray();
|
||||
return csvTags;
|
||||
|
||||
@@ -509,7 +509,7 @@ namespace Umbraco.Core.Services
|
||||
public IEnumerable<IMedia> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
|
||||
string orderBy, Direction orderDirection, bool orderBySystemField, string filter)
|
||||
{
|
||||
return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, true, filter, null);
|
||||
return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, orderBySystemField, filter, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+5
@@ -139,6 +139,11 @@ function ColorPickerController($scope) {
|
||||
if (!$scope.model.value)
|
||||
return;
|
||||
|
||||
// Backwards compatibility, the color used to be stored as a hex value only
|
||||
if (typeof $scope.model.value === "string") {
|
||||
$scope.model.value = { value: $scope.model.value, label: $scope.model.value };
|
||||
}
|
||||
|
||||
// Complex color (value and label)?
|
||||
if (!$scope.model.value.hasOwnProperty("value"))
|
||||
return;
|
||||
|
||||
+4
-2
@@ -35,7 +35,6 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
||||
return $scope.model.config.idType === "udi" ? i.udi : i.id;
|
||||
});
|
||||
$scope.model.value = trim(currIds.join(), ",");
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
|
||||
//Validate!
|
||||
if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) {
|
||||
@@ -84,7 +83,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
||||
opacity: 0.7,
|
||||
tolerance: "pointer",
|
||||
scroll: true,
|
||||
zIndex: 6000
|
||||
zIndex: 6000,
|
||||
update: function (e, ui) {
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
}
|
||||
};
|
||||
|
||||
if ($scope.model.config) {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
/Umbraco/**
|
||||
/Umbraco_Client/**
|
||||
@@ -520,7 +520,6 @@
|
||||
</Content>
|
||||
<Content Include="Umbraco\Install\Views\Web.config" />
|
||||
<Content Include="App_Plugins\ModelsBuilder\package.manifest" />
|
||||
<Content Include=".eslintignore" />
|
||||
<None Include="Config\404handlers.Release.config">
|
||||
<DependentUpon>404handlers.config</DependentUpon>
|
||||
</None>
|
||||
@@ -1039,9 +1038,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>7130</DevelopmentServerPort>
|
||||
<DevelopmentServerPort>7131</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:7130</IISUrl>
|
||||
<IISUrl>http://localhost:7131</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -349,7 +349,9 @@ namespace Umbraco.Web.Editors
|
||||
var mapped = AutoMapperExtensions.MapWithUmbracoContext<IContent, ContentItemDisplay>(emptyContent, UmbracoContext);
|
||||
// translate the content type name if applicable
|
||||
mapped.ContentTypeName = Services.TextService.UmbracoDictionaryTranslate(mapped.ContentTypeName);
|
||||
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
|
||||
// if your user type doesn't have access to the Settings section it would not get this property mapped
|
||||
if(mapped.DocumentType != null)
|
||||
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
|
||||
|
||||
//remove this tab if it exists: umbContainerView
|
||||
var containerTab = mapped.Tabs.FirstOrDefault(x => x.Alias == Constants.Conventions.PropertyGroups.ListViewGroupName);
|
||||
|
||||
Reference in New Issue
Block a user