trackler 2.0.8.19 → 2.0.8.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/phone-number/canonical-data.json +2 -2
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/c/config.json +7 -0
  5. data/tracks/c/exercises/react/makefile +16 -0
  6. data/tracks/c/exercises/react/src/example.c +185 -0
  7. data/tracks/c/exercises/react/src/react.h +29 -0
  8. data/tracks/c/exercises/react/test/test_react.c +324 -0
  9. data/tracks/c/exercises/react/test/vendor/unity.c +1300 -0
  10. data/tracks/c/exercises/react/test/vendor/unity.h +274 -0
  11. data/tracks/c/exercises/react/test/vendor/unity_internals.h +701 -0
  12. data/tracks/csharp/.travis.yml +2 -9
  13. data/tracks/csharp/appveyor.yml +3 -3
  14. data/tracks/csharp/build.cake +13 -4
  15. data/tracks/csharp/build.ps1 +56 -164
  16. data/tracks/csharp/build.sh +33 -78
  17. data/tracks/csharp/circle.yml +2 -4
  18. data/tracks/csharp/config.json +2 -1
  19. data/tracks/csharp/exercises/leap/LeapTest.cs +8 -8
  20. data/tracks/csharp/generators/CanonicalData.cs +19 -0
  21. data/tracks/csharp/generators/CanonicalDataCase.cs +24 -0
  22. data/tracks/csharp/generators/CanonicalDataCaseJsonConverter.cs +32 -0
  23. data/tracks/csharp/generators/CanonicalDataCasesJsonConverter.cs +30 -0
  24. data/tracks/csharp/generators/CanonicalDataParser.cs +28 -0
  25. data/tracks/csharp/generators/ExerciseCollection.cs +23 -0
  26. data/tracks/csharp/generators/Exercises/Exercise.cs +14 -0
  27. data/tracks/csharp/generators/Exercises/LeapExercise.cs +35 -0
  28. data/tracks/csharp/generators/Generators.csproj +12 -0
  29. data/tracks/csharp/generators/Generators.csproj.user +6 -0
  30. data/tracks/csharp/generators/Generators.sln +22 -0
  31. data/tracks/csharp/generators/Program.cs +59 -0
  32. data/tracks/csharp/generators/TestClass.cs +13 -0
  33. data/tracks/csharp/generators/TestClassRenderer.cs +36 -0
  34. data/tracks/csharp/generators/TestMethod.cs +9 -0
  35. data/tracks/csharp/generators/TestMethodNameTransformer.cs +11 -0
  36. data/tracks/csharp/generators/TestMethodRenderer.cs +18 -0
  37. data/tracks/csharp/generators/To.cs +7 -0
  38. data/tracks/csharp/generators/generate.ps1 +2 -0
  39. data/tracks/csharp/generators/generate.sh +4 -0
  40. data/tracks/delphi/config.json +8 -0
  41. data/tracks/delphi/exercises/phone-number/uPhoneNumberExample.pas +6 -6
  42. data/tracks/delphi/exercises/phone-number/uPhoneNumberTests.pas +28 -17
  43. data/tracks/delphi/exercises/roman-numerals/RomanNumerals.dpr +60 -0
  44. data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsExample.pas +49 -0
  45. data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +216 -0
  46. data/tracks/elixir/config.json +22 -0
  47. data/tracks/elixir/exercises/poker/example.exs +136 -0
  48. data/tracks/elixir/exercises/poker/poker.exs +34 -0
  49. data/tracks/elixir/exercises/poker/poker_test.exs +217 -0
  50. data/tracks/elixir/exercises/protein-translation/example.exs +62 -0
  51. data/tracks/elixir/exercises/protein-translation/protein_translation.exs +34 -0
  52. data/tracks/elixir/exercises/protein-translation/protein_translation_test.exs +87 -0
  53. data/tracks/elixir/exercises/say/example.exs +139 -0
  54. data/tracks/elixir/exercises/say/say.exs +8 -0
  55. data/tracks/elixir/exercises/say/say_test.exs +85 -0
  56. data/tracks/go/exercises/robot-name/example.go +2 -0
  57. data/tracks/go/exercises/robot-name/robot_name_test.go +9 -1
  58. data/tracks/go/exercises/roman-numerals/roman_numerals_test.go +4 -1
  59. data/tracks/go/exercises/saddle-points/saddle_points_test.go +6 -6
  60. data/tracks/php/config.json +7 -0
  61. data/tracks/php/exercises/grade-school/example.php +35 -0
  62. data/tracks/php/exercises/grade-school/grade-school_test.php +84 -0
  63. metadata +43 -2
@@ -1,15 +1,8 @@
1
1
  language: csharp
2
2
  sudo: required
3
3
  dist: trusty
4
- addons:
5
- apt:
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:
@@ -1,7 +1,7 @@
1
1
  image: Visual Studio 2017
2
- build_script:
3
- - ps: ./build.ps1
4
2
  environment:
5
3
  DOTNET_CLI_TELEMETRY_OPTOUT: true
6
4
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
7
- test: off
5
+ test: off
6
+ build_script:
7
+ - ps: ./build.ps1
@@ -1,4 +1,5 @@
1
- #addin "Cake.FileHelpers"
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 testFiles = buildDir + "/*/*Test.cs";
42
- var skipRegex = @"Skip\s*=\s*""Remove to run test""";
43
- ReplaceRegexInFiles(testFiles, skipRegex, "");
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")
@@ -1,189 +1,81 @@
1
- ##########################################################################
2
- # This is the Cake bootstrapper script for PowerShell.
3
- # This file was downloaded from https://github.com/cake-build/resources
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
- .SYNOPSIS
10
- This is a Powershell script to bootstrap a Cake build.
11
-
12
- .DESCRIPTION
13
- This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
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
- [CmdletBinding()]
42
- Param(
43
- [string]$Script = "build.cake",
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
- [Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
59
- function MD5HashFile([string] $filePath)
17
+ Function Remove-PathVariable([string]$VariableToRemove)
60
18
  {
61
- if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
19
+ $path = [Environment]::GetEnvironmentVariable("PATH", "User")
20
+ if ($path -ne $null)
62
21
  {
63
- return $null
22
+ $newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
23
+ [Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
64
24
  }
65
25
 
66
- [System.IO.Stream] $file = $null;
67
- [System.Security.Cryptography.MD5] $md5 = $null;
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
- if ($file -ne $null)
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
- Write-Host "Preparing to run build script..."
84
-
85
- if(!$PSScriptRoot){
86
- $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
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
- # Try find NuGet.exe in path if not exists
131
- if (!(Test-Path $NUGET_EXE)) {
132
- Write-Verbose -Message "Trying to find nuget.exe in PATH..."
133
- $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
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
- # Try download NuGet.exe if not exists
142
- if (!(Test-Path $NUGET_EXE)) {
143
- Write-Verbose -Message "Downloading NuGet.exe..."
144
- try {
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
- # Save nuget.exe path to environment to be available to child processed
152
- $ENV:NUGET_EXE = $NUGET_EXE
54
+ ###########################################################################
55
+ # INSTALL CAKE
56
+ ###########################################################################
153
57
 
154
- # Restore tools from NuGet?
155
- if(-Not $SkipToolPackageRestore.IsPresent) {
156
- Push-Location
157
- Set-Location $TOOLS_DIR
58
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
59
+ Function Unzip
60
+ {
61
+ param([string]$zipfile, [string]$outpath)
158
62
 
159
- # Check for changes in packages.config and remove installed tools if true.
160
- [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
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
- if ($LASTEXITCODE -ne 0) {
171
- Throw "An error occured while restoring NuGet tools."
172
- }
173
- else
174
- {
175
- $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
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
- # Make sure that Cake has been installed.
182
- if (!(Test-Path $CAKE_EXE)) {
183
- Throw "Could not find Cake.exe at $CAKE_EXE"
184
- }
76
+ ###########################################################################
77
+ # RUN BUILD SCRIPT
78
+ ###########################################################################
185
79
 
186
- # Start Cake
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
@@ -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
- NUGET_EXE=$TOOLS_DIR/nuget.exe
13
- CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
14
- PACKAGES_CONFIG=$TOOLS_DIR/packages.config
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
- # Make sure that packages.config exist.
55
- if [ ! -f "$TOOLS_DIR/packages.config" ]; then
56
- echo "Downloading packages.config..."
57
- curl -Lsfo "$TOOLS_DIR/packages.config" http://cakebuild.net/download/bootstrapper/packages
58
- if [ $? -ne 0 ]; then
59
- echo "An error occured while downloading packages.config."
60
- exit 1
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
- # Download NuGet if it does not exist.
65
- if [ ! -f "$NUGET_EXE" ]; then
66
- echo "Downloading NuGet..."
67
- curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
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 downloading nuget.exe."
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 "$CAKE_EXE" ]; then
92
- echo "Could not find Cake.exe at '$CAKE_EXE'."
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
- if $SHOW_VERSION; then
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" "$@"
@@ -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