trackler 2.0.8.19 → 2.0.8.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/phone-number/canonical-data.json +2 -2
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/config.json +7 -0
- data/tracks/c/exercises/react/makefile +16 -0
- data/tracks/c/exercises/react/src/example.c +185 -0
- data/tracks/c/exercises/react/src/react.h +29 -0
- data/tracks/c/exercises/react/test/test_react.c +324 -0
- data/tracks/c/exercises/react/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/react/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/react/test/vendor/unity_internals.h +701 -0
- data/tracks/csharp/.travis.yml +2 -9
- data/tracks/csharp/appveyor.yml +3 -3
- data/tracks/csharp/build.cake +13 -4
- data/tracks/csharp/build.ps1 +56 -164
- data/tracks/csharp/build.sh +33 -78
- data/tracks/csharp/circle.yml +2 -4
- data/tracks/csharp/config.json +2 -1
- data/tracks/csharp/exercises/leap/LeapTest.cs +8 -8
- data/tracks/csharp/generators/CanonicalData.cs +19 -0
- data/tracks/csharp/generators/CanonicalDataCase.cs +24 -0
- data/tracks/csharp/generators/CanonicalDataCaseJsonConverter.cs +32 -0
- data/tracks/csharp/generators/CanonicalDataCasesJsonConverter.cs +30 -0
- data/tracks/csharp/generators/CanonicalDataParser.cs +28 -0
- data/tracks/csharp/generators/ExerciseCollection.cs +23 -0
- data/tracks/csharp/generators/Exercises/Exercise.cs +14 -0
- data/tracks/csharp/generators/Exercises/LeapExercise.cs +35 -0
- data/tracks/csharp/generators/Generators.csproj +12 -0
- data/tracks/csharp/generators/Generators.csproj.user +6 -0
- data/tracks/csharp/generators/Generators.sln +22 -0
- data/tracks/csharp/generators/Program.cs +59 -0
- data/tracks/csharp/generators/TestClass.cs +13 -0
- data/tracks/csharp/generators/TestClassRenderer.cs +36 -0
- data/tracks/csharp/generators/TestMethod.cs +9 -0
- data/tracks/csharp/generators/TestMethodNameTransformer.cs +11 -0
- data/tracks/csharp/generators/TestMethodRenderer.cs +18 -0
- data/tracks/csharp/generators/To.cs +7 -0
- data/tracks/csharp/generators/generate.ps1 +2 -0
- data/tracks/csharp/generators/generate.sh +4 -0
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/exercises/phone-number/uPhoneNumberExample.pas +6 -6
- data/tracks/delphi/exercises/phone-number/uPhoneNumberTests.pas +28 -17
- data/tracks/delphi/exercises/roman-numerals/RomanNumerals.dpr +60 -0
- data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsExample.pas +49 -0
- data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +216 -0
- data/tracks/elixir/config.json +22 -0
- data/tracks/elixir/exercises/poker/example.exs +136 -0
- data/tracks/elixir/exercises/poker/poker.exs +34 -0
- data/tracks/elixir/exercises/poker/poker_test.exs +217 -0
- data/tracks/elixir/exercises/protein-translation/example.exs +62 -0
- data/tracks/elixir/exercises/protein-translation/protein_translation.exs +34 -0
- data/tracks/elixir/exercises/protein-translation/protein_translation_test.exs +87 -0
- data/tracks/elixir/exercises/say/example.exs +139 -0
- data/tracks/elixir/exercises/say/say.exs +8 -0
- data/tracks/elixir/exercises/say/say_test.exs +85 -0
- data/tracks/go/exercises/robot-name/example.go +2 -0
- data/tracks/go/exercises/robot-name/robot_name_test.go +9 -1
- data/tracks/go/exercises/roman-numerals/roman_numerals_test.go +4 -1
- data/tracks/go/exercises/saddle-points/saddle_points_test.go +6 -6
- data/tracks/php/config.json +7 -0
- data/tracks/php/exercises/grade-school/example.php +35 -0
- data/tracks/php/exercises/grade-school/grade-school_test.php +84 -0
- metadata +43 -2
data/tracks/csharp/.travis.yml
CHANGED
@@ -1,15 +1,8 @@
|
|
1
1
|
language: csharp
|
2
2
|
sudo: required
|
3
3
|
dist: trusty
|
4
|
-
|
5
|
-
|
6
|
-
sources:
|
7
|
-
- sourceline: 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main'
|
8
|
-
key_url: 'https://apt-mo.trafficmanager.net/keys/microsoft.asc'
|
9
|
-
packages:
|
10
|
-
- dotnet-dev-1.0.1
|
11
|
-
mono:
|
12
|
-
- 4.0.5
|
4
|
+
dotnet: 1.0.1
|
5
|
+
mono: none
|
13
6
|
os:
|
14
7
|
- linux
|
15
8
|
env:
|
data/tracks/csharp/appveyor.yml
CHANGED
data/tracks/csharp/build.cake
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
using System.IO;
|
2
|
+
using System.Text.RegularExpressions;
|
2
3
|
|
3
4
|
var target = Argument("target", "Default");
|
4
5
|
|
@@ -38,9 +39,17 @@ Task("BuildStubImplementations")
|
|
38
39
|
Task("EnableAllTests")
|
39
40
|
.IsDependentOn("BuildStubImplementations")
|
40
41
|
.Does(() => {
|
41
|
-
var
|
42
|
-
var
|
43
|
-
|
42
|
+
var skipRegex = new Regex(@"Skip\s*=\s*""Remove to run test""", RegexOptions.Compiled);
|
43
|
+
var testFiles = GetFiles(buildDir + "/*/*Test.cs");
|
44
|
+
|
45
|
+
foreach (var testFile in testFiles) {
|
46
|
+
var contents = System.IO.File.ReadAllText(testFile.FullPath);
|
47
|
+
|
48
|
+
if (skipRegex.IsMatch(contents)) {
|
49
|
+
var updatedContents = skipRegex.Replace(contents, "");
|
50
|
+
System.IO.File.WriteAllText(testFile.FullPath, updatedContents);
|
51
|
+
}
|
52
|
+
}
|
44
53
|
});
|
45
54
|
|
46
55
|
Task("TestRefactoringProjects")
|
data/tracks/csharp/build.ps1
CHANGED
@@ -1,189 +1,81 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# Feel free to change this file to fit your needs.
|
5
|
-
##########################################################################
|
1
|
+
$CakeVersion = "0.18.0"
|
2
|
+
$DotNetVersion = "1.0.1";
|
3
|
+
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
|
6
4
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
and execute your Cake build script with the parameters you provide.
|
15
|
-
|
16
|
-
.PARAMETER Script
|
17
|
-
The build script to execute.
|
18
|
-
.PARAMETER Target
|
19
|
-
The build script target to run.
|
20
|
-
.PARAMETER Configuration
|
21
|
-
The build configuration to use.
|
22
|
-
.PARAMETER Verbosity
|
23
|
-
Specifies the amount of information to be displayed.
|
24
|
-
.PARAMETER Experimental
|
25
|
-
Tells Cake to use the latest Roslyn release.
|
26
|
-
.PARAMETER WhatIf
|
27
|
-
Performs a dry run of the build script.
|
28
|
-
No tasks will be executed.
|
29
|
-
.PARAMETER Mono
|
30
|
-
Tells Cake to use the Mono scripting engine.
|
31
|
-
.PARAMETER SkipToolPackageRestore
|
32
|
-
Skips restoring of packages.
|
33
|
-
.PARAMETER ScriptArgs
|
34
|
-
Remaining arguments are added here.
|
35
|
-
|
36
|
-
.LINK
|
37
|
-
http://cakebuild.net
|
38
|
-
|
39
|
-
#>
|
5
|
+
# Make sure tools folder exists
|
6
|
+
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
7
|
+
$ToolPath = Join-Path $PSScriptRoot "tools"
|
8
|
+
if (!(Test-Path $ToolPath)) {
|
9
|
+
Write-Verbose "Creating tools directory..."
|
10
|
+
New-Item -Path $ToolPath -Type directory | out-null
|
11
|
+
}
|
40
12
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
[string]$Target = "Default",
|
45
|
-
[ValidateSet("Release", "Debug")]
|
46
|
-
[string]$Configuration = "Release",
|
47
|
-
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
48
|
-
[string]$Verbosity = "Verbose",
|
49
|
-
[switch]$Experimental,
|
50
|
-
[Alias("DryRun","Noop")]
|
51
|
-
[switch]$WhatIf,
|
52
|
-
[switch]$Mono,
|
53
|
-
[switch]$SkipToolPackageRestore,
|
54
|
-
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
55
|
-
[string[]]$ScriptArgs
|
56
|
-
)
|
13
|
+
###########################################################################
|
14
|
+
# INSTALL .NET CORE CLI
|
15
|
+
###########################################################################
|
57
16
|
|
58
|
-
[
|
59
|
-
function MD5HashFile([string] $filePath)
|
17
|
+
Function Remove-PathVariable([string]$VariableToRemove)
|
60
18
|
{
|
61
|
-
|
19
|
+
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
|
20
|
+
if ($path -ne $null)
|
62
21
|
{
|
63
|
-
|
22
|
+
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
|
23
|
+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
|
64
24
|
}
|
65
25
|
|
66
|
-
|
67
|
-
|
68
|
-
try
|
69
|
-
{
|
70
|
-
$md5 = [System.Security.Cryptography.MD5]::Create()
|
71
|
-
$file = [System.IO.File]::OpenRead($filePath)
|
72
|
-
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
73
|
-
}
|
74
|
-
finally
|
26
|
+
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
|
27
|
+
if ($path -ne $null)
|
75
28
|
{
|
76
|
-
|
77
|
-
|
78
|
-
$file.Dispose()
|
79
|
-
}
|
29
|
+
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
|
30
|
+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
|
80
31
|
}
|
81
32
|
}
|
82
33
|
|
83
|
-
|
84
|
-
|
85
|
-
if(
|
86
|
-
$
|
87
|
-
}
|
88
|
-
|
89
|
-
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
90
|
-
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
91
|
-
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
92
|
-
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
93
|
-
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
94
|
-
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
95
|
-
|
96
|
-
# Should we use mono?
|
97
|
-
$UseMono = "";
|
98
|
-
if($Mono.IsPresent) {
|
99
|
-
Write-Verbose -Message "Using the Mono based scripting engine."
|
100
|
-
$UseMono = "-mono"
|
101
|
-
}
|
102
|
-
|
103
|
-
# Should we use the new Roslyn?
|
104
|
-
$UseExperimental = "";
|
105
|
-
if($Experimental.IsPresent -and !($Mono.IsPresent)) {
|
106
|
-
Write-Verbose -Message "Using experimental version of Roslyn."
|
107
|
-
$UseExperimental = "-experimental"
|
108
|
-
}
|
109
|
-
|
110
|
-
# Is this a dry run?
|
111
|
-
$UseDryRun = "";
|
112
|
-
if($WhatIf.IsPresent) {
|
113
|
-
$UseDryRun = "-dryrun"
|
114
|
-
}
|
115
|
-
|
116
|
-
# Make sure tools folder exists
|
117
|
-
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
118
|
-
Write-Verbose -Message "Creating tools directory..."
|
119
|
-
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
120
|
-
}
|
121
|
-
|
122
|
-
# Make sure that packages.config exist.
|
123
|
-
if (!(Test-Path $PACKAGES_CONFIG)) {
|
124
|
-
Write-Verbose -Message "Downloading packages.config..."
|
125
|
-
try { (New-Object System.Net.WebClient).DownloadFile("http://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
|
126
|
-
Throw "Could not download packages.config."
|
127
|
-
}
|
34
|
+
# Get .NET Core CLI path if installed.
|
35
|
+
$FoundDotNetCliVersion = $null;
|
36
|
+
if (Get-Command dotnet -ErrorAction SilentlyContinue) {
|
37
|
+
$FoundDotNetCliVersion = dotnet --version;
|
128
38
|
}
|
129
39
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
135
|
-
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
136
|
-
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
137
|
-
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
40
|
+
if($FoundDotNetCliVersion -ne $DotNetVersion) {
|
41
|
+
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
|
42
|
+
if (!(Test-Path $InstallPath)) {
|
43
|
+
mkdir -Force $InstallPath | Out-Null;
|
138
44
|
}
|
139
|
-
|
45
|
+
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
|
46
|
+
& $InstallPath\dotnet-install.ps1 -Version $DotNetVersion -InstallDir $InstallPath;
|
140
47
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
|
146
|
-
} catch {
|
147
|
-
Throw "Could not download NuGet.exe."
|
148
|
-
}
|
48
|
+
Remove-PathVariable "$InstallPath"
|
49
|
+
$env:PATH = "$InstallPath;$env:PATH"
|
50
|
+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
51
|
+
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
|
149
52
|
}
|
150
53
|
|
151
|
-
|
152
|
-
|
54
|
+
###########################################################################
|
55
|
+
# INSTALL CAKE
|
56
|
+
###########################################################################
|
153
57
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
58
|
+
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
59
|
+
Function Unzip
|
60
|
+
{
|
61
|
+
param([string]$zipfile, [string]$outpath)
|
158
62
|
|
159
|
-
|
160
|
-
|
161
|
-
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
162
|
-
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
163
|
-
Write-Verbose -Message "Missing or changed package.config hash..."
|
164
|
-
Remove-Item * -Recurse -Exclude packages.config,nuget.exe
|
165
|
-
}
|
63
|
+
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
64
|
+
}
|
166
65
|
|
167
|
-
Write-Verbose -Message "Restoring tools from NuGet..."
|
168
|
-
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
169
66
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
Write-Verbose -Message ($NuGetOutput | out-string)
|
178
|
-
Pop-Location
|
67
|
+
# Make sure Cake has been installed.
|
68
|
+
$CakePath = Join-Path $ToolPath "Cake.CoreCLR.$CakeVersion/Cake.dll"
|
69
|
+
if (!(Test-Path $CakePath)) {
|
70
|
+
Write-Host "Installing Cake..."
|
71
|
+
(New-Object System.Net.WebClient).DownloadFile("https://www.nuget.org/api/v2/package/Cake.CoreCLR/$CakeVersion", "$ToolPath\Cake.CoreCLR.zip")
|
72
|
+
Unzip "$ToolPath\Cake.CoreCLR.zip" "$ToolPath/Cake.CoreCLR.$CakeVersion"
|
73
|
+
Remove-Item "$ToolPath\Cake.CoreCLR.zip"
|
179
74
|
}
|
180
75
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
}
|
76
|
+
###########################################################################
|
77
|
+
# RUN BUILD SCRIPT
|
78
|
+
###########################################################################
|
185
79
|
|
186
|
-
|
187
|
-
Write-Host "Running build script..."
|
188
|
-
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
|
80
|
+
& dotnet "$CakePath" $args
|
189
81
|
exit $LASTEXITCODE
|
data/tracks/csharp/build.sh
CHANGED
@@ -1,101 +1,56 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
##########################################################################
|
4
|
-
# This is the Cake bootstrapper script for Linux and OS X.
|
5
|
-
# This file was downloaded from https://github.com/cake-build/resources
|
6
|
-
# Feel free to change this file to fit your needs.
|
7
|
-
##########################################################################
|
8
|
-
|
9
3
|
# Define directories.
|
10
4
|
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
11
5
|
TOOLS_DIR=$SCRIPT_DIR/tools
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum
|
16
|
-
|
17
|
-
# Define md5sum or md5 depending on Linux/OSX
|
18
|
-
MD5_EXE=
|
19
|
-
if [[ "$(uname -s)" == "Darwin" ]]; then
|
20
|
-
MD5_EXE="md5 -r"
|
21
|
-
else
|
22
|
-
MD5_EXE="md5sum"
|
23
|
-
fi
|
24
|
-
|
25
|
-
# Define default arguments.
|
26
|
-
SCRIPT="build.cake"
|
27
|
-
TARGET="Default"
|
28
|
-
CONFIGURATION="Release"
|
29
|
-
VERBOSITY="verbose"
|
30
|
-
DRYRUN=
|
31
|
-
SHOW_VERSION=false
|
32
|
-
SCRIPT_ARGUMENTS=()
|
33
|
-
|
34
|
-
# Parse arguments.
|
35
|
-
for i in "$@"; do
|
36
|
-
case $1 in
|
37
|
-
-s|--script) SCRIPT="$2"; shift ;;
|
38
|
-
-t|--target) TARGET="$2"; shift ;;
|
39
|
-
-c|--configuration) CONFIGURATION="$2"; shift ;;
|
40
|
-
-v|--verbosity) VERBOSITY="$2"; shift ;;
|
41
|
-
-d|--dryrun) DRYRUN="-dryrun" ;;
|
42
|
-
--version) SHOW_VERSION=true ;;
|
43
|
-
--) shift; SCRIPT_ARGUMENTS+=("$@"); break ;;
|
44
|
-
*) SCRIPT_ARGUMENTS+=("$1") ;;
|
45
|
-
esac
|
46
|
-
shift
|
47
|
-
done
|
6
|
+
CAKE_VERSION=0.18.0
|
7
|
+
CAKE_DLL=$TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION/Cake.dll
|
8
|
+
DOTNET_VERSION=1.0.1
|
48
9
|
|
49
|
-
# Make sure the tools folder exist.
|
10
|
+
# Make sure the tools folder exist.
|
50
11
|
if [ ! -d "$TOOLS_DIR" ]; then
|
51
12
|
mkdir "$TOOLS_DIR"
|
52
13
|
fi
|
53
14
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
15
|
+
###########################################################################
|
16
|
+
# INSTALL .NET CORE CLI
|
17
|
+
###########################################################################
|
18
|
+
|
19
|
+
if [[ ! $(command -v dotnet) ]] || [ ! $(dotnet --version) == "$DOTNET_VERSION" ] ; then
|
20
|
+
echo "Installing .NET CLI..."
|
21
|
+
|
22
|
+
if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
|
23
|
+
mkdir "$SCRIPT_DIR/.dotnet"
|
61
24
|
fi
|
25
|
+
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
|
26
|
+
sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version DOTNET_VERSION --install-dir .dotnet --no-path
|
27
|
+
export PATH="$SCRIPT_DIR/.dotnet":$PATH
|
28
|
+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
29
|
+
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
30
|
+
"$SCRIPT_DIR/.dotnet/dotnet" --info
|
62
31
|
fi
|
63
32
|
|
64
|
-
#
|
65
|
-
|
66
|
-
|
67
|
-
|
33
|
+
# ###########################################################################
|
34
|
+
# # INSTALL CAKE
|
35
|
+
# ###########################################################################
|
36
|
+
|
37
|
+
if [ ! -f "$CAKE_DLL" ]; then
|
38
|
+
curl -Lsfo Cake.CoreCLR.zip "https://www.nuget.org/api/v2/package/Cake.CoreCLR/$CAKE_VERSION" && unzip -q Cake.CoreCLR.zip -d "$TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION" && rm -f Cake.CoreCLR.zip
|
68
39
|
if [ $? -ne 0 ]; then
|
69
|
-
echo "An error occured while
|
40
|
+
echo "An error occured while installing Cake."
|
70
41
|
exit 1
|
71
42
|
fi
|
72
43
|
fi
|
73
44
|
|
74
|
-
# Restore tools from NuGet.
|
75
|
-
pushd "$TOOLS_DIR" >/dev/null
|
76
|
-
if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then
|
77
|
-
find . -type d ! -name . | xargs rm -rf
|
78
|
-
fi
|
79
|
-
|
80
|
-
mono "$NUGET_EXE" install -ExcludeVersion
|
81
|
-
if [ $? -ne 0 ]; then
|
82
|
-
echo "Could not restore NuGet packages."
|
83
|
-
exit 1
|
84
|
-
fi
|
85
|
-
|
86
|
-
$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5"
|
87
|
-
|
88
|
-
popd >/dev/null
|
89
|
-
|
90
45
|
# Make sure that Cake has been installed.
|
91
|
-
if [ ! -f "$
|
92
|
-
echo "Could not find Cake.exe at '$
|
46
|
+
if [ ! -f "$CAKE_DLL" ]; then
|
47
|
+
echo "Could not find Cake.exe at '$CAKE_DLL'."
|
93
48
|
exit 1
|
94
49
|
fi
|
95
50
|
|
51
|
+
###########################################################################
|
52
|
+
# RUN BUILD SCRIPT
|
53
|
+
###########################################################################
|
54
|
+
|
96
55
|
# Start Cake
|
97
|
-
|
98
|
-
exec mono "$CAKE_EXE" -version
|
99
|
-
else
|
100
|
-
exec mono "$CAKE_EXE" $SCRIPT -verbosity=$VERBOSITY -configuration=$CONFIGURATION -target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}"
|
101
|
-
fi
|
56
|
+
exec dotnet "$CAKE_DLL" "$@"
|
data/tracks/csharp/circle.yml
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
machine:
|
2
2
|
environment:
|
3
|
-
TERM: xterm-256color
|
4
3
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
5
4
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
6
5
|
dependencies:
|
7
6
|
pre:
|
8
7
|
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
|
9
8
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
|
10
|
-
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
|
11
|
-
- echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
|
12
9
|
- sudo apt-get update
|
13
|
-
- sudo apt-get install mono-complete
|
14
10
|
- sudo apt-get install dotnet-dev-1.0.1
|
15
11
|
test:
|
16
12
|
override:
|
13
|
+
- ./bin/fetch-configlet
|
14
|
+
- ./bin/configlet .
|
17
15
|
- ./build.sh
|