Skip to content

Commit

Permalink
RavenDB-9540 Prepare build scripts for RTM - upload scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gregolsky authored and ayende committed Dec 15, 2017
1 parent 55bdbe3 commit 52821c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scripts/upload.ps1
@@ -1,21 +1,27 @@
# TODO @gregolsky update regexes for stable
$CATEGORIES = @(
@('RavenDB-[0-9]\.[0-9]\.[0-9]-[a-zA-Z]+-([0-9-]+)-windows-x64', "RavenDB for Windows x64"),
@('RavenDB-[0-9]\.[0-9]\.[0-9]-[a-zA-Z]+-([0-9-]+)-windows-x86', "RavenDB for Windows x86"),
@('RavenDB-[0-9]\.[0-9]\.[0-9]-[a-zA-Z]+-([0-9-]+)-linux-x64', "RavenDB for Linux x64"),
@('RavenDB-[0-9]\.[0-9]\.[0-9]-[a-zA-Z]+-([0-9-]+)-osx-x64', "RavenDB for OSX"),
@('RavenDB-[0-9]\.[0-9]\.[0-9]-[a-zA-Z]+-([0-9-]+)-raspberry-pi', "RavenDB for Raspberry Pi")
@('RavenDB-[0-9]\.[0-9]\.[0-9](-[a-zA-Z]+-([0-9-]+))?-windows-x64', "RavenDB for Windows x64"),
@('RavenDB-[0-9]\.[0-9]\.[0-9](-[a-zA-Z]+-([0-9-]+))?-windows-x86', "RavenDB for Windows x86"),
@('RavenDB-[0-9]\.[0-9]\.[0-9](-[a-zA-Z]+-([0-9-]+))?-linux-x64', "RavenDB for Linux x64"),
@('RavenDB-[0-9]\.[0-9]\.[0-9](-[a-zA-Z]+-([0-9-]+))?-osx-x64', "RavenDB for OSX"),
@('RavenDB-[0-9]\.[0-9]\.[0-9](-[a-zA-Z]+-([0-9-]+))?-raspberry-pi', "RavenDB for Raspberry Pi")
)
function Get-UploadCategory ( $filename ) {
$result = [io.path]::GetFilenameWithoutExtension($filename)
$foundCategory = $null;
foreach ($category in $CATEGORIES) {
$categoryPattern = $category[0]
if ($filename -match $categoryPattern) {
$result = $category[1]
$foundCategory = $category[1]
break
}
}

if ([string]::IsNullOrEmpty($foundCategory)) {
throw "Could not determine category for $filename."
}

$result
}

Expand Down
3 changes: 3 additions & 0 deletions upload.ps1
Expand Up @@ -14,4 +14,7 @@ $uploader = [io.path]::combine($projectDir, '..', 'Uploader', 'S3Uploader.exe')
$versionInfo = GetVersionInfo
$files = Get-ChildItem $ARTIFACTS

$filesString = $files -join "`r`n"
write-host "Found artifacts: `r`n$filesString"

Upload "$uploader" $versionInfo $files $DryRun

0 comments on commit 52821c1

Please sign in to comment.