Skip to content

Commit

Permalink
Get a travis build running
Browse files Browse the repository at this point in the history
  • Loading branch information
hnrkndrssn committed May 31, 2015
1 parent 4ac581b commit ac55ab9
Show file tree
Hide file tree
Showing 9 changed files with 4,941 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
*.lock.json

# User-specific files
*.suo
Expand Down
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: CSharp
install:
- echo "deb http://download.mono-project.com/repo/debian nightly main" | sudo tee /etc/apt/sources.list.d/mono-nightly.list
- sudo apt-get update
- sudo apt-get install mono-complete
- mono --version
script:
- ./build.sh --quiet verify
8 changes: 8 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetRelease" value="https://www.myget.org/F/aspnetrelease/api/v2" />
<add key="NuGet" value="https://nuget.org/api/v2/" />
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
</packageSources>
</configuration>
12 changes: 0 additions & 12 deletions NuGet.config

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JabbR v2
# JabbR v2 [![Build Status](https://travis-ci.org/alfhenrik/JabbRv2.svg?branch=dev)](https://travis-ci.org/alfhenrik/JabbRv2)

JabbR is a xplat chat web application built with ASP.NET 5 and MVC 6 using SignalR.

Expand Down
38 changes: 38 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo off
cd %~dp0

RMDIR /S /Q src\JabbR\wwwroot\lib\*

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF DEFINED BUILDCMD_RELEASE (
.nuget\NuGet.exe install KoreBuild -version 0.2.1-%BUILDCMD_RELEASE% -ExcludeVersion -o packages -nocache -pre
) ELSE (
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -source https://www.myget.org/F/aspnetmaster/api/v2
)
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF DEFINED BUILDCMD_RELEASE (
CALL packages\KoreBuild\build\dnvm install 1.0.0-%BUILDCMD_RELEASE% -runtime CLR -arch x86 -a default
) ELSE (
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
43 changes: 35 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
#!/bin/bash
rm -rf artifacts

rm -rf src/JabbR/wwwroot/lib

if test `uname` = Darwin; then
cachedir=~/Library/Caches/KBuild
else
if [ -z $XDG_DATA_HOME ]; then
cachedir=$HOME/.local/share
else
cachedir=$XDG_DATA_HOME;
fi
fi
mkdir -p $cachedir

url=https://www.nuget.org/nuget.exe

if test ! -f $cachedir/nuget.exe; then
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
fi

if test ! -e .nuget; then
mkdir .nuget
cp $cachedir/nuget.exe .nuget/nuget.exe
fi

if test ! -d packages/KoreBuild; then
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
mono .nuget/nuget.exe install Sake -version 0.2 -o packages -ExcludeVersion
fi

if ! type dnvm > /dev/null 2>&1; then
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | sh && source ~/.dnx/dnvm/dnvm.sh
source packages/KoreBuild/build/dnvm.sh
fi
export DNX_UNSTABLE_FEED=https://www.myget.org/F/aspnetrelease/api/v2
dnvm install 1.0.0-beta5-11911
dnu restore src/JabbR

rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
if ! type dnx > /dev/null 2>&1; then
dnvm upgrade
fi

dnu publish src/JabbR --no-source --out artifacts/build/jabbr --runtime active 2>&1 | tee buildlog
grep "Build succeeded" buildlog
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"
6 changes: 6 additions & 0 deletions makefile.shade
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='JabbR Kore Team'

use-standard-lifecycle
k-standard-goals
Loading

0 comments on commit ac55ab9

Please sign in to comment.