Commit e851a1bd authored by Viet Hoang's avatar Viet Hoang
Browse files

add Build Steps of v93

parent 7f19738a
if (Test-Path .\%vhs.devSettingsFileName%)
remove-Item .\%vhs.devSettingsFileName%
$content = '<?xml version="1.0"?>
<configuration xmlns:patch="">
<sc.variable name="VietHoangSourceFolder" value="%vhs.sitecoreDataFolder%" />
In Windows, there is 248 characters limit on the lenght of file system paths. To avoid exceeding the maximum path length, Rainbow will loop
long paths back to the root. This setting specifies the maximum length of the path to the serialization root path,
which determines how long item paths can be before they are looped.
Important: The value of this setting must be the same on all Sitecore instances accessing the serialized data.
Important: When changing this value, you must reserialize all configurations!
Example: A value of "90" for this setting will mean that item paths longer than 150 characters will be shortened, since Sitecore
reserves 8 characters (and 248 - 8 - 90 = 150).
Default value: 90
<setting name="Rainbow.SFS.SerializationFolderPathMaxLength" value="150" />
<setting name="Rainbow.SFS.MaxItemNameLengthBeforeTruncation" value="50" />
new-item -path .\ -name %vhs.devSettingsFileName% -type "file" -value $content
Get-Content .\%vhs.devSettingsFileName%
\ No newline at end of file
if (Test-Path .\GlobalAssemblyInfo.cs)
remove-Item .\GlobalAssemblyInfo.cs
$content = '
using System.Reflection;
[assembly: AssemblyCompany("VietHoang")]
[assembly: AssemblyCopyright("Copyright © VietHoang 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("{0}")]
[assembly: AssemblyInformationalVersion("{0}")]
[assembly: AssemblyFileVersion("{0}")]
' -f "%vhs.AssemblyVersion%"
new-item -path .\ -name GlobalAssemblyInfo.cs -type "file" -value $content
Get-Content .\GlobalAssemblyInfo.cs
\ No newline at end of file
if (Test-Path .\cake-config.json)
remove-Item .\cake-config.json
$content = '{{
"WebsiteRoot": "{0}",
"InstanceUrl": "{1}",
"SolutionName": "VietHoang.Sitecore.sln",
"ProjectFolder": "{2}",
"BuildConfiguration": "{3}",
"BuildToolVersions": "VS2019",
"RunCleanBuilds": false,
"UnicornConfigurations": "VietHoang.Foundation.Serialization.SolutionRoot,VietHoang.Foundation.Serialization.LayerRoot,VietHoang.Foundation.Serialization.SupportedLanguages"
}}' -f "%vhs.websiteRoot%".replace("\", "\\"), "%vhs.instanceUrl%", "".replace("\", "\\"), "%vhs.buildConfiguration%"
new-item -path .\ -name cake-config.json -type "file" -value $content
Get-Content .\cake-config.json
\ No newline at end of file
if (Test-Path ".\publishsettings.targets")
remove-Item .\publishsettings.targets
$content = '<Project ToolsVersion="4.0" xmlns="">
new-item -path .\ -name publishsettings.targets -type "file" -value $content
Get-Content .\publishsettings.targets
\ No newline at end of file
$targetPath = "%vhs.sitecoreDataFolder%\seria"
$sourcePath = "\seria"
$FoldersExclude = '"code" "roles" "Tests"'
$FilesExclude = ""
# /e: Copies subdirectories. Note that this option includes empty directories
# With the /e plus /purge options, if the destination directory exists, the destination directory security settings are not overwritten.
# /xd Excludes directories that match the specified names and paths.
# /xf Excludes files that match the specified names or paths. Note that FileName can include wildcard characters (* and ?).
robocopy $sourcePath $targetPath /e /purge /xd $FoldersExclude /xf $FilesExclude
\ No newline at end of file
cmd.exe /c 'SonarScanner.MSBuild.exe begin /k:"%vhs.sonarProjectName%" /"%vhs.sonarHostUrl%" /d:sonar.login="%vhs.sonarProjectToken%"'
cmd.exe /c 'MsBuild.exe /t:Restore'
cmd.exe /c 'MsBuild.exe /t:Rebuild'
cmd.exe /c 'SonarScanner.MSBuild.exe end /d:sonar.login="%vhs.sonarProjectToken%"'
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment