Integrate copy-binary-ps1 script
This commit is contained in:
@@ -1,11 +1,29 @@
|
||||
param(
|
||||
[String]$SourcePath,
|
||||
[String]$FileName,
|
||||
[String]$Configuration
|
||||
[String]$Configuration,
|
||||
[String]$ProjectName
|
||||
)
|
||||
|
||||
if ($Configuration -eq "Release") {
|
||||
$DestinationPath = "P:\Install .Net\0 DD - Bibliotheken\Modules\$FileName"
|
||||
Copy-Item $SourcePath -Destination $DestinationPath
|
||||
}
|
||||
$ArchiveFolderName = "Archiv"
|
||||
$DestinationPath = "P:\Install .Net\0 DD - Bibliotheken\Modules\$ProjectName\"
|
||||
$DestinationFilePath = [IO.Path]::Combine($DestinationPath, $FileName)
|
||||
$ArchiveBasePath = [IO.Path]::Combine($DestinationPath, $ArchiveFolderName)
|
||||
|
||||
if ($Configuration -eq "Release") {
|
||||
$DateFolderName = $((Get-Date).ToString('yyyy-MM-dd_hh-mm'))
|
||||
$ArchivePath = [IO.Path]::Combine($ArchiveBasePath, $DateFolderName)
|
||||
|
||||
if (!(Test-Path -Path $ArchiveBasePath)) {
|
||||
New-Item -Path $ArchiveBasePath -Type Directory
|
||||
}
|
||||
|
||||
if (Test-Path -Path $DestinationFilePath) {
|
||||
if (!(Test-Path -Path $ArchivePath)) {
|
||||
New-Item -Path $ArchivePath -Type Directory
|
||||
}
|
||||
Copy-Item $DestinationFilePath -Destination $ArchivePath
|
||||
}
|
||||
|
||||
Copy-Item $SourcePath -Destination $DestinationFilePath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user