Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Archive an Andi project
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