Permalink
Browse files

Transition to netcore rc2 and using dotnet cli

* Update dependencies
* Transition to RC2
* Transition to netstandard
* Update Newtonsoft.Json 8.0.2 -> 8.0.3
* Move .src\YesSql.Tests -> .test\YesSql.Tests
* Build with dotnet
* Using netstandard for samples
* Remove project name from output path
* Add dependency on Microsoft.NETCore.Platforms and on NETStandard.Library
* Commenting unused samples
* Packing using dotnet cli
* Remove old files
* Add travis and appveyor CI support
  • Loading branch information...
alexbocharov authored and sebastienros committed Apr 4, 2016
1 parent db7dc7e commit b3c83fdafa45ec47020cfdbe38298e4da6990a95
Showing with 641 additions and 1,275 deletions.
  1. +4 −1 .gitignore
  2. +26 −0 .travis.yml
  3. +1 −0 NuGet.config
  4. +42 −1 YesSql.sln
  5. +0 −62 _appveyor.yml
  6. +15 −0 appveyor.yml
  7. +2 −3 build.cmd
  8. +0 −58 build.proj
  9. +67 −0 build.ps1
  10. +46 −0 build.sh
  11. +0 −32 buildci.ps1
  12. +1 −1 global.json
  13. +5 −5 pack.cmd
  14. +0 −15 project.json
  15. +0 −6 samples/YesSql.Bench/App.config
  16. +0 −84 samples/YesSql.Bench/YesSql.Bench.csproj
  17. +1 −1 samples/YesSql.Bench/YesSql.Bench.xproj
  18. +0 −5 samples/YesSql.Bench/packages.config
  19. +9 −5 samples/YesSql.Bench/project.json
  20. +9 −9 samples/YesSql.Samples.FullText/Indexes/ArticleByWord.cs
  21. +32 −32 samples/YesSql.Samples.FullText/Indexes/ArticleIndexProvider.cs
  22. +7 −7 samples/YesSql.Samples.FullText/Models/Article.cs
  23. +58 −58 samples/YesSql.Samples.FullText/Program.cs
  24. +10 −10 samples/YesSql.Samples.FullText/Tokenizers/ITokenFilter.cs
  25. +7 −7 samples/YesSql.Samples.FullText/Tokenizers/ITokenizer.cs
  26. +12 −12 samples/YesSql.Samples.FullText/Tokenizers/StopWordFilter.cs
  27. +24 −24 samples/YesSql.Samples.FullText/Tokenizers/WhiteSpaceTokenizer.cs
  28. +0 −82 samples/YesSql.Samples.FullText/YesSql.Samples.FullText.csproj
  29. +1 −1 samples/YesSql.Samples.FullText/YesSql.Samples.FullText.xproj
  30. +0 −6 samples/YesSql.Samples.FullText/app.config
  31. +0 −4 samples/YesSql.Samples.FullText/packages.config
  32. +19 −22 samples/YesSql.Samples.FullText/project.json
  33. +8 −8 samples/YesSql.Samples.Hi/Indexes/BlogPostByAuthor.cs
  34. +9 −9 samples/YesSql.Samples.Hi/Indexes/BlogPostByDay.cs
  35. +37 −37 samples/YesSql.Samples.Hi/Indexes/BlogPostIndexProvider.cs
  36. +12 −12 samples/YesSql.Samples.Hi/Models/BlogPost.cs
  37. +78 −78 samples/YesSql.Samples.Hi/Program.cs
  38. +0 −78 samples/YesSql.Samples.Hi/YesSql.Samples.Hi.csproj
  39. +1 −1 samples/YesSql.Samples.Hi/YesSql.Samples.Hi.xproj
  40. +0 −6 samples/YesSql.Samples.Hi/app.config
  41. +0 −4 samples/YesSql.Samples.Hi/packages.config
  42. +8 −11 samples/YesSql.Samples.Hi/project.json
  43. +0 −90 samples/YesSql.Samples.Performance/YesSql.Samples.Performance.csproj
  44. +1 −1 samples/YesSql.Samples.Performance/YesSql.Samples.Performance.xproj
  45. +0 −6 samples/YesSql.Samples.Performance/app.config
  46. +0 −9 samples/YesSql.Samples.Performance/packages.config
  47. +11 −7 samples/YesSql.Samples.Performance/project.json
  48. +0 −140 src/YesSql.Core/YesSql.Core.csproj
  49. +1 −1 src/YesSql.Core/YesSql.Core.xproj
  50. +0 −15 src/YesSql.Core/app.config
  51. +9 −5 src/YesSql.Core/project.json
  52. +1 −1 src/YesSql.Storage.Cache/YesSql.Storage.Cache.xproj
  53. +9 −9 src/YesSql.Storage.Cache/project.json
  54. +1 −1 src/YesSql.Storage.InMemory/YesSql.Storage.InMemory.xproj
  55. +9 −9 src/YesSql.Storage.InMemory/project.json
  56. +1 −1 src/YesSql.Storage.LightningDB/YesSql.Storage.LightningDB.xproj
  57. +9 −9 src/YesSql.Storage.LightningDB/project.json
  58. +1 −1 src/YesSql.Storage.Sql/YesSql.Storage.Sql.xproj
  59. +9 −9 src/YesSql.Storage.Sql/project.json
  60. +0 −107 src/YesSql.Tests/YesSql.Tests.csproj
  61. +0 −11 src/YesSql.Tests/app.config
  62. +0 −24 src/YesSql.Tests/project.json
  63. 0 {src → test}/YesSql.Tests/CoreTests.cs
  64. 0 {src → test}/YesSql.Tests/Indexes/ArticleByDay.cs
  65. 0 {src → test}/YesSql.Tests/Indexes/LongestNameByLetter.cs
  66. 0 {src → test}/YesSql.Tests/Indexes/PersonByAge.cs
  67. 0 {src → test}/YesSql.Tests/Indexes/PersonByName.cs
  68. 0 {src → test}/YesSql.Tests/Indexes/PublishedArticles.cs
  69. 0 {src → test}/YesSql.Tests/Models/Animal.cs
  70. 0 {src → test}/YesSql.Tests/Models/Article.cs
  71. 0 {src → test}/YesSql.Tests/Models/Drawing.cs
  72. 0 {src → test}/YesSql.Tests/Models/Person.cs
  73. 0 {src → test}/YesSql.Tests/Models/Products.cs
  74. 0 {src → test}/YesSql.Tests/Properties/AssemblyInfo.cs
  75. 0 {src → test}/YesSql.Tests/TemporaryFolder.cs
  76. +1 −1 {src → test}/YesSql.Tests/YesSql.Tests.xproj
  77. +27 −0 test/YesSql.Tests/project.json
  78. +0 −2 testci.ps1
  79. +0 −19 yessql.xproj
View
@@ -20,4 +20,7 @@ src/*.vsmdi
artifacts
*.vsp
project.lock.json
-*.mdb
+*.mdb
+.vs/
+.build/
+.testPublish/
View
@@ -0,0 +1,26 @@
+language: csharp
+sudo: required
+dist: trusty
+addons:
+ apt:
+ packages:
+ - gettext
+ - libcurl4-openssl-dev
+ - libicu-dev
+ - libssl-dev
+ - libunwind8
+ - zlib1g
+mono:
+ - 4.0.5
+os:
+ - linux
+ - osx
+osx_image: xcode7.1
+branches:
+ only:
+ - master
+ - release
+ - dev
+ - /^(.*\/)?ci-.*$/
+script:
+ - ./build.sh verify
View
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
+ <add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
View
@@ -10,11 +10,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EDE52F22-03E3-4909-8BAB-D5E0B2E0815A}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
+ NuGet.config = NuGet.config
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Samples.Performance", "samples\YesSql.Samples.Performance\YesSql.Samples.Performance.xproj", "{F2C23E01-C045-4D8E-997F-A9110DA5E041}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Tests", "src\YesSql.Tests\YesSql.Tests.xproj", "{2E2082CC-BB43-4971-A419-3F5CE5BD2CD7}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Tests", "test\YesSql.Tests\YesSql.Tests.xproj", "{2E2082CC-BB43-4971-A419-3F5CE5BD2CD7}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Bench", "samples\YesSql.Bench\YesSql.Bench.xproj", "{54213D0E-F9D8-4293-AD78-852FC72423F9}"
EndProject
@@ -26,6 +27,14 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Storage.Sql", "src\Y
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Storage.Cache", "src\YesSql.Storage.Cache\YesSql.Storage.Cache.xproj", "{45940D28-3708-4EF1-8428-D85AD47D5594}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C294EC4-E6EF-4839-AD34-335C1A5112F9}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{90072A27-51D8-4043-B4D2-940088010E69}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Samples.Hi", "samples\YesSql.Samples.Hi\YesSql.Samples.Hi.xproj", "{2F005B29-D46A-441F-933D-CD25A0235074}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "YesSql.Samples.FullText", "samples\YesSql.Samples.FullText\YesSql.Samples.FullText.xproj", "{DC85F009-6C82-4829-9764-E328C04F023F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -132,13 +141,45 @@ Global
{45940D28-3708-4EF1-8428-D85AD47D5594}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{45940D28-3708-4EF1-8428-D85AD47D5594}.Release|x86.ActiveCfg = Release|Any CPU
{45940D28-3708-4EF1-8428-D85AD47D5594}.Release|x86.Build.0 = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Debug|x86.Build.0 = Debug|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|x86.ActiveCfg = Release|Any CPU
+ {2F005B29-D46A-441F-933D-CD25A0235074}.Release|x86.Build.0 = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Debug|x86.Build.0 = Debug|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|x86.ActiveCfg = Release|Any CPU
+ {DC85F009-6C82-4829-9764-E328C04F023F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {A69B2298-1840-46E8-849E-CA68C96364EE} = {0C294EC4-E6EF-4839-AD34-335C1A5112F9}
{F2C23E01-C045-4D8E-997F-A9110DA5E041} = {0882456B-4A70-4895-A3AE-39B9D30A1B31}
+ {2E2082CC-BB43-4971-A419-3F5CE5BD2CD7} = {90072A27-51D8-4043-B4D2-940088010E69}
{54213D0E-F9D8-4293-AD78-852FC72423F9} = {0882456B-4A70-4895-A3AE-39B9D30A1B31}
+ {D5A78707-E9FD-497B-8EF9-3739E63265B2} = {0C294EC4-E6EF-4839-AD34-335C1A5112F9}
+ {B45DB217-4CB4-4942-BD71-6126571D1504} = {0C294EC4-E6EF-4839-AD34-335C1A5112F9}
+ {2BEB1EEC-2FC4-42CA-A410-5C7C6AF721B4} = {0C294EC4-E6EF-4839-AD34-335C1A5112F9}
+ {45940D28-3708-4EF1-8428-D85AD47D5594} = {0C294EC4-E6EF-4839-AD34-335C1A5112F9}
+ {2F005B29-D46A-441F-933D-CD25A0235074} = {0882456B-4A70-4895-A3AE-39B9D30A1B31}
+ {DC85F009-6C82-4829-9764-E328C04F023F} = {0882456B-4A70-4895-A3AE-39B9D30A1B31}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Store.vsmdi
View
@@ -1,62 +0,0 @@
-nuget:
- account_feed: true
-
-init:
- - git config --global core.autocrlf true
-
-services:
- - mssql2014
-
-install:
-# - cmd: nuget sources add -Name api.nuget.org -Source https://api.nuget.org/v3/index.json
- - ps: "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
- - ps: dnvm update-self
- - ps: dnvm upgrade
- - ps: dnvm install 1.0.0-rc1-update1
- - ps: dnvm install -r coreclr -arch x64 latest
- - ps: dnvm alias default 1.0.0-rc1-update1 -r coreclr
- - ps: dnvm use default -p
- - ps: dnvm list
-# YesSql.Core
- - ps: dnu restore .\src\YesSql.Core\project.json
- - ps: dnu build .\src\YesSql.Core\project.json
-
-# YesSql.Storage.Sql
- - ps: dnu restore .\src\YesSql.Storage.Sql\project.json
- - ps: dnu build .\src\YesSql.Storage.Sql\project.json
-
-# YesSql.Storage.Prevalence
- - ps: dnu restore .\src\YesSql.Storage.Prevalence\project.json
- - ps: dnu build .\src\YesSql.Storage.Prevalence\project.json
-
-# YesSql.Storage.LightningDB
- - ps: dnu restore .\src\YesSql.Storage.LightningDB\project.json
- - ps: dnu build .\src\YesSql.Storage.LightningDB\project.json
-
-# YesSql.Storage.InMemory
- - ps: dnu restore .\src\YesSql.Storage.InMemory\project.json
- - ps: dnu build .\src\YesSql.Storage.InMemory\project.json
-
-# YesSql.Storage.FileSystem
- - ps: dnu restore .\src\YesSql.Storage.FileSystem\project.json
- - ps: dnu build .\src\YesSql.Storage.FileSystem\project.json
-
-# YesSql.Storage.Cache
- - ps: dnu restore .\src\YesSql.Storage.Cache\project.json
- - ps: dnu build .\src\YesSql.Storage.Cache\project.json
-
-# YesSql.Tests
- - ps: dnu restore .\src\YesSql.Tests\project.json
- - ps: dnu build .\src\YesSql.Tests\project.json
-
- - ps: $env:DBCONNECTIONSTRING = "Server=(local)\\SQL2014;Database=master;User ID=sa;Password=Password12!"
-
- - ps: cd .\src\YesSql.Tests
- - ps: dnx test
-
-
-# build:
-# project: YesSql.sln
-
-# test_script:
-
View
@@ -0,0 +1,15 @@
+init:
+ - git config --global core.autocrlf true
+services:
+ - mssql2014
+branches:
+ only:
+ - master
+ - release
+ - dev
+ - /^(.*\/)?ci-.*$/
+build_script:
+ - build.cmd verify
+clone_depth: 1
+test: off
+deploy: off
View
@@ -1,3 +1,2 @@
-if "%~1"=="" build Build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /t:%~1 build.proj
-
+@ECHO OFF
+PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
View
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
- <UsingTask AssemblyFile="$(MSBuildProjectDirectory)\tools\xunit-1.9\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
-
- <PropertyGroup>
- <ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts</ArtifactsFolder>
- <BuildFolder>$(MSBuildProjectDirectory)\build</BuildFolder>
- <ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts</ArtifactsFolder>
- <SrcFolder>$(MSBuildProjectDirectory)\src</SrcFolder>
- <RootFolder>$(MSBuildProjectDirectory)</RootFolder>
- </PropertyGroup>
-
- <Target Name ="Build">
- <CallTarget Targets="Clean"/>
- <CallTarget Targets="Compile"/>
- <CallTarget Targets="Test" />
- <CallTarget Targets="Package" />
- <CallTarget Targets="Nuget" />
- </Target>
-
- <Target Name="Clean">
- <MSBuild Projects="$(RootFolder)\YesSql.sln" Targets="Clean" />
- <RemoveDir Directories="$(BuildFolder)" ContinueOnError="true"/>
- <RemoveDir Directories="$(ArtifactsFolder)" ContinueOnError="true"/>
- </Target>
-
- <Target Name ="Compile" DependsOnTargets="Clean">
- <MSBuild
- Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
- Targets="Build"
- Properties="Configuration=Release;OutputPath=$(BuildFolder)" />
- </Target>
-
- <Target Name="Test" DependsOnTargets="Compile">
- <MSBuild
- Projects="$(SrcFolder)\YesSql.Tests\YesSql.Tests.csproj"
- Targets="Build"
- Properties="Configuration=Release;OutputPath=$(BuildFolder)" />
-
- <xunit Assembly="$(BuildFolder)\YesSql.Tests.dll"/>
- </Target>
-
- <Target Name ="Package" DependsOnTargets="Test">
- <MSBuild
- Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
- Targets="Build"
- Properties="Configuration=Release;OutputPath=$(ArtifactsFolder)" />
- </Target>
-
- <Target Name ="Nuget" DependsOnTargets="Package">
- <MSBuild
- Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
- Targets="Build"
- Properties="Configuration=Release;PackageOutputDir=$(ArtifactsFolder);BuildPackage=True" />
- </Target>
-
-</Project>
View
@@ -0,0 +1,67 @@
+$ErrorActionPreference = "Stop"
+
+function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
+{
+ while($true)
+ {
+ try
+ {
+ Invoke-WebRequest $url -OutFile $downloadLocation
+ break
+ }
+ catch
+ {
+ $exceptionMessage = $_.Exception.Message
+ Write-Host "Failed to download '$url': $exceptionMessage"
+ if ($retries -gt 0) {
+ $retries--
+ Write-Host "Waiting 10 seconds before retrying. Retries left: $retries"
+ Start-Sleep -Seconds 10
+
+ }
+ else
+ {
+ $exception = $_.Exception
+ throw $exception
+ }
+ }
+ }
+}
+
+cd $PSScriptRoot
+
+$repoFolder = $PSScriptRoot
+$env:REPO_FOLDER = $repoFolder
+
+$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
+if ($env:KOREBUILD_ZIP)
+{
+ $koreBuildZip=$env:KOREBUILD_ZIP
+}
+
+$buildFolder = ".build"
+$buildFile="$buildFolder\KoreBuild.ps1"
+
+if (!(Test-Path $buildFolder)) {
+ Write-Host "Downloading KoreBuild from $koreBuildZip"
+
+ $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
+ New-Item -Path "$tempFolder" -Type directory | Out-Null
+
+ $localZipFile="$tempFolder\korebuild.zip"
+
+ DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+ [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
+
+ New-Item -Path "$buildFolder" -Type directory | Out-Null
+ copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
+
+ # Cleanup
+ if (Test-Path $tempFolder) {
+ Remove-Item -Recurse -Force $tempFolder
+ }
+}
+
+&"$buildFile" $args
View
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cd $repoFolder
+
+koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
+if [ ! -z $KOREBUILD_ZIP ]; then
+ koreBuildZip=$KOREBUILD_ZIP
+fi
+
+buildFolder=".build"
+buildFile="$buildFolder/KoreBuild.sh"
+
+if test ! -d $buildFolder; then
+ echo "Downloading KoreBuild from $koreBuildZip"
+
+ tempFolder="/tmp/KoreBuild-$(uuidgen)"
+ mkdir $tempFolder
+
+ localZipFile="$tempFolder/korebuild.zip"
+
+ retries=6
+ until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
+ do
+ echo "Failed to download '$koreBuildZip'"
+ if [ "$retries" -le 0 ]; then
+ exit 1
+ fi
+ retries=$((retries - 1))
+ echo "Waiting 10 seconds before retrying. Retries left: $retries"
+ sleep 10s
+ done
+
+ unzip -q -d $tempFolder $localZipFile
+
+ mkdir $buildFolder
+ cp -r $tempFolder/**/build/** $buildFolder
+
+ chmod +x $buildFile
+
+ # Cleanup
+ if test ! -d $tempFolder; then
+ rm -rf $tempFolder
+ fi
+fi
+
+$buildFile -r $repoFolder "$@"
Oops, something went wrong.

0 comments on commit b3c83fd

Please sign in to comment.