Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions change/react-native-windows-2020-01-15-20-42-29-master.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "none",
"comment": "Fix Layout-Headers on CI machines",
"packageName": "react-native-windows",
"email": "nick@nickgerleman.com",
"commit": "bc33f50c50fbed7fef86a94624d50379ec518996",
"date": "2020-01-16T04:42:29.828Z"
}
14 changes: 13 additions & 1 deletion vnext/Scripts/Tfs/Layout-Headers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@ param(
[string] $SourceRoot = ($PSScriptRoot | Split-Path | Split-Path | Split-Path),
[string] $TargetRoot = "$SourceRoot\vnext\target",
[System.IO.DirectoryInfo] $ReactWindowsRoot = "$SourceRoot\vnext",
[System.IO.DirectoryInfo] $ReactNativeRoot = "$SourceRoot\vnext\build\" + @(gci "$ReactWindowsRoot\build\" react-native-patched -Recurse -Directory -Name)[0],
[System.IO.DirectoryInfo] $ReactNativeRoot,
[string] $FollyVersion = '2019.09.30.00',
[System.IO.DirectoryInfo] $FollyRoot = "$SourceRoot\node_modules\.folly\folly-${FollyVersion}",
[string[]] $Extensions = ('h', 'hpp', 'def')
)

if (!$ReactNativeRoot) {
$intermediateBuildDir = if ($env:BaseIntDir) { $env:BaseIntDir } else { "$SourceRoot\vnext\build\" }
$relativeRnDir = @(gci $intermediateBuildDir react-native-patched -Recurse -Directory -Name)[0]

if (!$relativeRnDir) {
throw "Cannot find patched React Native Directory (has a project been built?)"
}

$ReactNativeRoot = $intermediateBuildDir + $relativeRnDir
}

Write-Host "Source root: [$SourceRoot]"
Write-Host "Destination root: [$TargetRoot]"
Write-Host "React Native root: [$ReactNativeRoot]"

$patterns = $Extensions| ForEach-Object {"*.$_"}

Expand Down