Skip to content

Commit

Permalink
Build behind proxy and appveyor.
Browse files Browse the repository at this point in the history
Fixes #79. Uses Download-File function from d654a53

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.
  • Loading branch information
MartiUK committed Oct 16, 2015
1 parent 2a26026 commit 46fed27
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
40 changes: 40 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down
13 changes: 13 additions & 0 deletions scripts/utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 46fed27

Please sign in to comment.