forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.ps1
More file actions
41 lines (37 loc) · 1.23 KB
/
Copy pathdeploy.ps1
File metadata and controls
41 lines (37 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Deploys the built binaries to the FD.org server
Param (
$variables = @{},
$artifacts = @{},
$scriptPath,
$buildFolder,
$srcFolder,
$outFolder,
$tempFolder,
$projectName,
$projectVersion,
$projectBuildNumber
)
$login = $variables["SecureLogin"]
$pass = $variables["SecurePass"]
foreach($artifact in $artifacts.values)
{
Write-Output "Upload artifact: $($artifact.name)"
$ext = [System.IO.Path]::GetExtension($artifact.name)
$name = [System.IO.Path]::GetFileNameWithoutExtension($artifact.name)
IF ($ext -eq ".xml")
{
# Upload appman.xml file
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$($artifact.path)" "$name$ext";
}
ELSE
{
# Upload the installer and the zip archive
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$($artifact.path)" "downloads/builds/$name$ext";
}
}
Write-Output "Create and upload build info."
$date = Get-Date
$file = [System.IO.Path]::GetTempFileName()
$data = "Build: $projectVersion`r`nTime: " + $date.ToUniversalTime() + " GMT"
$data | Set-Content $file
ncftpput.exe -u "$login" -p "$pass" -C ftp.flashdevelop.org "$file" "downloads/builds/FlashDevelop-$env:APPVEYOR_REPO_BRANCH.txt";