Build behind proxy and appveyor.

Fixes #79. Uses Download-File function from d654a53ec43038c42344f9cdbe0abc5b8ff9b387

Create appveyor.yml

Should send build notifications to gitter as well.

Adds appveyor build status badge.

Always compile launcher for AppVeyor

This is to catch any errors that may be caused by changes to the launcher or any outside scripts.
This commit is contained in:
Martin Kemp 2015-10-13 09:40:48 +01:00
parent 2a26026749
commit 46fed27096
4 changed files with 57 additions and 2 deletions

View File

@ -2,6 +2,8 @@
[![Join the chat at https://gitter.im/bliker/cmder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Build Status](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?retina=true)
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://conemu.github.io/) with *major* config overhaul, adds a Monokai color scheme, integrates amazing [clink](https://github.com/mridgers/clink) and a custom prompt layout.
![Cmder Screenshot](http://i.imgur.com/g1nNf0I.png)

40
appveyor.yml Normal file
View File

@ -0,0 +1,40 @@
#---------------------------------#
# general configuration #
#---------------------------------#
version: 1.0.{build}-{branch}
# branches to build
branches:
# blacklist
except:
- gh-pages
# Do not build on tags
skip_tags: true
#---------------------------------#
# environment configuration #
#---------------------------------#
# Operating system (build VM template)
os: Windows Server 2012 R2
#---------------------------------#
# build configuration #
#---------------------------------#
build_script:
- ps: cd scripts; .\build.ps1 -Compile -verbose
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Webhook
- provider: Webhook
url: https://webhooks.gitter.im/e/f7b9c3ae66741c2e046e
on_build_success: true
on_build_failure: true
on_build_status_changed: true

View File

@ -74,7 +74,7 @@ if ($config -ne "") {
} else { $ConEmuXml = "" }
} else { $ConEmuXml = "" }
$vend = $pwd
foreach ($s in $sources) {
if($Full -eq $false -and $s.name -eq "git-for-windows"){
Continue
@ -87,7 +87,7 @@ foreach ($s in $sources) {
Delete-Existing $tempArchive
Delete-Existing $s.name
Invoke-WebRequest -Uri $s.url -OutFile $tempArchive -ErrorAction Stop
Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop
Extract-Archive $tempArchive $s.name
if ((Get-Childitem $s.name).Count -eq 1) {

View File

@ -89,3 +89,16 @@ function Register-Cmder(){
New-Item -Path "HKCR:\Directory\Shell\Cmder\Command" -Force -Value "`"$PathToExe`" `"$Command`" "
}
}
function Download-File {
param (
$Url,
$File
)
# I think this is the problem
$File = $File -Replace "/", "\"
Write-Verbose "Downloading from $Url to $File"
$wc = new-object System.Net.WebClient
$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
$wc.DownloadFile($Url, $File)
}