Skip to content

Commit

Permalink
Merge pull request #204 from tbolon/corefx
Browse files Browse the repository at this point in the history
Migrate to .NET Core
  • Loading branch information
Henrik Feldt committed Sep 21, 2016
2 parents 20e7366 + 40a887d commit 130b3fd
Show file tree
Hide file tree
Showing 116 changed files with 870 additions and 30,692 deletions.
17 changes: 12 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ bin
*.suo
*.cache
Thumbs.db
.vs
project.lock.json
*.project.lock.json

# packages
src/packages/

# Other useful stuff
*.bak
Expand All @@ -28,11 +34,12 @@ httpd.parse.errors

# Office Temp Files
~$*

# NUnit test results
TestResult.xml

# If you have a deploy folder
# deploy
# deploy/*
# build directory
build/

# Exclude ALL DLLs? (
# *.dll
/build/TestResult.xml
# *.dll
23 changes: 17 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
---
language: csharp
mono:
- latest
- 4.2.3
solution: src/DotLiquid.sln

matrix:
include:
- os: linux
dist: trusty # Ubuntu 14.04
sudo: required
dotnet: 1.0.0-preview2-003121
mono: none
env: DOTNETCORE=1

before_install:
- sudo apt-get install nunit-console
script:
- xbuild /p:Configuration=Release src/DotLiquid.sln
- nunit-console src/DotLiquid.Tests/bin/Release/DotLiquid.Tests.dll
- dotnet restore
- dotnet build src/DotLiquid/project.json --configuration Release --framework netstandard1.3
- dotnet build src/DotLiquid.Website/project.json --configuration Release --framework netcoreapp1.0
- dotnet build src/DotLiquid.Tests/project.json --configuration Release --framework netcoreapp1.0
- dotnet build src/DotLiquid.Website.Tests/project.json --configuration Release --framework netcoreapp1.0
- dotnet test src/DotLiquid.Tests --framework netcoreapp1.0 --where "cat != windows"
- dotnet test src/DotLiquid.Website.Tests --framework netcoreapp1.0 --where "cat != windows"

21 changes: 19 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build script for dotliquid, see https://www.appveyor.com/docs/appveyor-yml for reference
# Build script for dotliquid, see https://www.appveyor.com/docs/appveyor-yml for reference
version: 2.0.{build}

branches:
Expand All @@ -13,14 +13,31 @@ assembly_info:
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}-$(GIT_HASH)"
assembly_informational_version: "{version}-$(APPVEYOR_REPO_COMMIT)"

install:
- cmd: dotnet restore

build:
verbosity: minimal # quiet|minimal|normal|detailed
project: src/DotLiquid.sln
publish_nuget: true
publish_nuget_symbols: true

after_build:
- cmd: md build\pkg
- cmd: nuget pack src/DotLiquid/DotLiquid.nuspec -Symbols -Version "%APPVEYOR_BUILD_VERSION%" -OutputDirectory build\pkg

test:
assemblies:
# Disabled: ‍‍Could not load file or assembly 'nunit.framework' or one of its dependencies. The system cannot find the file specified.
# - '**\bin\Release\netcoreapp1.0\*.Tests.dll'
- '**\bin\Release\net451\win7-x64\*.Tests.dll'
categories:
except:
- windows


artifacts:
- path: build\pkg\*.nupkg
name: Nuget Package
Expand Down
1 change: 0 additions & 1 deletion src/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions src/DotLiquid-2008.sln

This file was deleted.

29 changes: 0 additions & 29 deletions src/DotLiquid-2010.sln

This file was deleted.

2 changes: 1 addition & 1 deletion src/DotLiquid.Tests/ContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public object ToLiquid()

private Context _context;

[TestFixtureSetUp]
[OneTimeSetUp]
public void SetUp()
{
_context = new Context();
Expand Down
39 changes: 39 additions & 0 deletions src/DotLiquid.Tests/CultureHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Globalization;

namespace DotLiquid
{
internal static class CultureHelper
{
public static IDisposable SetCulture(string name)
{
var scope = new CultureScope(CultureInfo.CurrentCulture);

#if CORE
CultureInfo.CurrentCulture = new CultureInfo(name);
#else
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(name);
#endif
return scope;
}

private class CultureScope : IDisposable
{
private readonly CultureInfo culture;

public CultureScope(CultureInfo culture)
{
this.culture = culture;
}

public void Dispose()
{
#if CORE
CultureInfo.CurrentCulture = this.culture;
#else
System.Threading.Thread.CurrentThread.CurrentCulture = this.culture;
#endif
}
}
}
}
102 changes: 0 additions & 102 deletions src/DotLiquid.Tests/DotLiquid.Tests-2008.csproj

This file was deleted.

Loading

0 comments on commit 130b3fd

Please sign in to comment.