Created
October 31, 2019 15:22
-
-
Save peaeater/38121c479d532acaf141e15aaabe12f2 to your computer and use it in GitHub Desktop.
Archive an Andi project
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
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$in, | |
[string]$out = "d:\dev-archive" | |
) | |
$extract_output_dir = "$in\extract\extracted\output\*" | |
remove-item $extract_output_dir -Recurse | |
Write-Host "Removed $extract_output_dir" | |
$solr_data_dir = "$in\solr-*\cores\core1\data\*" | |
remove-item $solr_data_dir -Recurse | |
write-host "Removed $solr_data_dir" | |
$nuget_packages_dir = "$in\src\packages" | |
remove-item $nuget_packages_dir -Recurse | |
write-host "Removed $nuget_packages_dir" | |
$bin_dir = "$in\src\*web\bin" | |
remove-item $bin_dir -Recurse | |
write-host "Removed $bin_dir" | |
$node_modules_dir = "$in\src\*web\node_modules" | |
remove-item $node_modules_dir -Recurse | |
write-host "Removed $node_modules_dir" | |
$imagecache_dir = "$in\src\*web\imagecache\*" | |
remove-item $imagecache_dir -Recurse | |
write-host "Removed $imagecache_dir" | |
$wwwroot_dir = "$in\src\*web\wwwroot\*" | |
remove-item $wwwroot_dir -Recurse | |
write-host "Removed $wwwroot_dir" | |
move-item $in $out -Force | |
write-host "Archived at $out." -ForegroundColor Green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment