Created
June 5, 2017 14:38
-
-
Save AdamNaj/a21ec421ce628ee4caf71be2fe3aae19 to your computer and use it in GitHub Desktop.
Unicorn vs Sitecore Serialization compare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sitecoreSerializationPath = "C:\inetpub\wwwroot\sitecore81\Data\serialization" | |
$unicornSerializationPath = "C:\Projects\sitecorepowershell\Trunk\Cognifide.PowerShell\serialization" | |
$serializationIds = gci $sitecoreSerializationPath -filter "*.item" -recurse | Get-Content -first 3 | ? { $_.Startswith("id:") } | % { $_.Substring(5,36).ToLower() } | |
$unicornIds = gci $unicornSerializationPath -filter "*.yml" -recurse | Get-Content -first 2 | ? { $_.Startswith("ID:") } | % { $_.Substring(5,36) } | |
"$($serializationIds.Count) items in Sitecore Serialization" | |
"$($unicornIds.Count) items in Unicorn Serialization" | |
Write-Host "---- Missing in Unicorn ----" | |
$serializationIds | ? { $unicornIds.IndexOf($_) -lt 0 } | |
Write-Host "---- Missing in Sitecore Serialization ----" | |
$unicornIds | ? { $serializationIds.IndexOf($_) -lt 0 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment