Skip to content

Commit dc057f7

Browse files
committed
Smarter deploy script...
1 parent f5d4993 commit dc057f7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

CI/deploy.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ Param (
1515

1616
$login = $variables["SecureLogin"]
1717
$pass = $variables["SecurePass"]
18+
$fd = false;
19+
$hd = false;
1820

1921
foreach($artifact in $artifacts.values)
2022
{
2123
Write-Output "Upload artifact: $($artifact.name)"
2224
$ext = [System.IO.Path]::GetExtension($artifact.name)
2325
$name = [System.IO.Path]::GetFileNameWithoutExtension($artifact.name)
26+
IF ($name -eg "FlashDevelop") { $fd = true; }
27+
IF ($name -eg "HaxeDevelop") { $hd = true; }
2428
IF ($ext -eq ".xml")
2529
{
2630
# Upload appman.xml file
@@ -38,5 +42,11 @@ $date = Get-Date
3842
$file = [System.IO.Path]::GetTempFileName()
3943
$data = "Build: $projectVersion`r`nTime: " + $date.ToUniversalTime() + " GMT"
4044
$data | Set-Content $file
41-
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$file" "downloads/builds/FlashDevelop-$env:APPVEYOR_REPO_BRANCH.txt";
42-
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$file" "downloads/builds/HaxeDevelop-$env:APPVEYOR_REPO_BRANCH.txt";
45+
IF ($fd)
46+
{
47+
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$file" "downloads/builds/FlashDevelop-$env:APPVEYOR_REPO_BRANCH.txt";
48+
}
49+
IF ($hd)
50+
{
51+
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$file" "downloads/builds/HaxeDevelop-$env:APPVEYOR_REPO_BRANCH.txt";
52+
}

0 commit comments

Comments
 (0)