Skip to content

Commit f2d0fdd

Browse files
committed
Copy app tiles
1 parent fa41230 commit f2d0fdd

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/scripts/Copy-AppTiles.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
param (
2+
[string]$Channel, # Dev, Preview, or Stable
3+
[string]$WorkingDir
4+
)
5+
6+
# Define source and destination paths
7+
$SourcePath = "$WorkingDir\src\Files.App\Assets\AppTiles\$Channel"
8+
$DestinationPath = "$WorkingDir\src\Files.App\Assets\AppTiles\Current"
9+
10+
# Check if the source directory exists
11+
if (-Not (Test-Path -Path $SourcePath)) {
12+
Write-Host "Source path '$SourcePath' does not exist. Please check the branch name." -ForegroundColor Red
13+
exit 1
14+
}
15+
16+
# Ensure the destination directory exists
17+
if (-Not (Test-Path -Path $DestinationPath)) {
18+
Write-Host "Destination path '$DestinationPath' does not exist. Creating it now..." -ForegroundColor Yellow
19+
New-Item -ItemType Directory -Path $DestinationPath | Out-Null
20+
} else {
21+
# Delete the contents of the destination directory
22+
Write-Host "Clearing contents of '$DestinationPath'..."
23+
Get-ChildItem -Path $DestinationPath -Recurse | Remove-Item -Force -Recurse
24+
}
25+
26+
# Copy files from source to destination
27+
Write-Host "Copying files from '$SourcePath' to '$DestinationPath'..."
28+
Copy-Item -Path "$SourcePath\*" -Destination $DestinationPath -Recurse -Force
29+
30+
Write-Host "Files copied successfully!" -ForegroundColor Green

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Files.App.OpenDialog*.dll
88
Files.App.SaveDialog*.dll
99
Files.App.Launcher.exe
1010

11+
src/Files.App/Assets/AppTiles/RealWorld/
12+
1113
# User-specific files
1214
*.rsuser
1315
*.suo

eng/MakeAppXManifest.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
<Target Name="RunConfigureAppXManifest" BeforeTargets="Build">
33
<Exec Command="powershell -ExecutionPolicy Bypass -File $(RepoDir)\scripts\Configure-AppXManifest.ps1 -Branch $(AppEnvironment) -PackageManifestPath $(AppXManifestFile) -IsBuildingInVisualStudio $(BuildingInsideVisualStudio)" />
44
</Target>
5+
<Target Name="PrepareAppTiles" BeforeTargets="Build">
6+
<Exec Command="powershell -ExecutionPolicy Bypass -File $(RepoDir)\scripts\Copy-AppTiles.ps1 -Branch $(AppChannel)" />
7+
</Target>
58
</Project>

0 commit comments

Comments
 (0)