-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to help prepare files for release in a consitent way
- Loading branch information
1 parent
0ee49ea
commit c674967
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Create temp folder to store release files | ||
# Copy dashboard files | ||
# Copy dacpacs | ||
# Copy executables | ||
|
||
# Get root path of this script: | ||
$PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition | ||
|
||
# Read SQLWATCH build version: | ||
|
||
[string]$Version = Select-String -Path "$PSScriptRoot\SqlWatch.Monitor\Project.SqlWatch.Database\Scripts\Pre-Deployment\SetDacVersion.sql" -Pattern [0-9] | select-object -ExpandProperty Line | ||
[string]$Version = $Version.Trim() | ||
|
||
# Create TMP folder to store release files: | ||
$TmpFolder = "C:\TEMP\" | ||
$ReleaseFolderName = "SQLWATCH $Version $(get-date -f yyyyMMddHHmmss)" | ||
$ReleaseFolder = "$TmpFolder\$ReleaseFolderName" | ||
New-Item -Path $ReleaseFolder -ItemType Directory | ||
|
||
# Copy Dashboard files: | ||
Copy-Item -Recurse -Path "$PSScriptRoot\SqlWatch.Dashboard\" -Destination "$ReleaseFolder" -Container -Exclude *.bak | ||
|
||
# Copy Dacpacs: | ||
Copy-Item -Path "$PSScriptRoot\SqlWatch.Monitor\Project.SqlWatch.Database\bin\Debug\*.dacpac" -Destination "$ReleaseFolder" | ||
|
||
# Copy SSIS: | ||
Copy-Item -Path "$PSScriptRoot\SqlWatch.Monitor\Project.SqlWatch.IntegrationServices\bin\Development\SQLWATCHSSIS.ispac" -Destination "$ReleaseFolder" | ||
|
||
# Copy SQLWATCH Importer | ||
New-Item -Path "$ReleaseFolder\SqlWatchImport" -ItemType Directory | ||
Copy-Item -Path "$PSScriptRoot\SqlWatch.Monitor\Project.SqlWatchImport\bin\Debug\*" -Destination "$ReleaseFolder\SqlWatchImport" -Exclude *.log,*.pdb | ||
|
||
# Create ZIP: | ||
Compress-Archive -Path $ReleaseFolder -DestinationPath "$TmpFolder\$ReleaseFolderName.zip" |