Skip to content

Commit

Permalink
Use make.mudlet.org for Windows snapshots (Mudlet#2819)
Browse files Browse the repository at this point in the history
* Test convert to powershell

* Alternative approach

* Zip release up

* Try

* fin

* Set global variable

* Echo right deploy URL

* Use real curl

* Use powershell syntax

* Add call operator

* Redirect standard output and error to variable

* Use Invoke-RestMethod instead of curl.exe

* Correct indenting in YAML

* >- syntax contatenates all commands together; try separate file

* Revert ">- syntax contatenates all commands together; try separate file"

This reverts commit af90118.

* Try using semicolon as command separator

* Upload right after building

* Properly store uploaded URL in a variable

* Finalise upload script

* Remove extra spaces
  • Loading branch information
vadi2 authored Jul 21, 2019
1 parent ea9cfe9 commit 5f6bf00
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CI/appveyor.after_success.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ windeployqt.exe --release mudlet.exe
Remove-Item * -include *.cpp, *.o

if ("$Env:APPVEYOR_REPO_TAG" -eq "false") {
$DEPLOY_URL = "https://ci.appveyor.com/api/buildjobs/$Env:APPVEYOR_JOB_ID/artifacts/src%2Fmudlet.zip"
cmd /c 7z a Mudlet-%VERSION%%MUDLET_VERSION_BUILD%-windows.zip "%APPVEYOR_BUILD_FOLDER%\src\release"

Set-Variable -Name "uri" -Value "https://make.mudlet.org/snapshots/Mudlet-$env:VERSION$env:MUDLET_VERSION_BUILD-windows.zip";
Set-Variable -Name "inFile" -Value "Mudlet-$env:VERSION$env:MUDLET_VERSION_BUILD-windows.zip";
Set-Variable -Name "outFile" -Value "upload-location.txt";
Invoke-RestMethod -Uri $uri -Method PUT -InFile $inFile -OutFile $outFile;

$DEPLOY_URL = Get-Content -Path $outFile -Raw
} else {
Write-Output "=== Cloning installer project ==="
git clone https://github.com/Mudlet/installers.git C:\projects\installers
Expand Down

0 comments on commit 5f6bf00

Please sign in to comment.