Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2c2fccc
Showing
16 changed files
with
1,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
|
||
[Dd]ebug/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.tmp_proj | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
*.pidb | ||
*.log | ||
*.scc | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
|
||
|
||
# Click-Once directory | ||
publish/ | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
*.pubxml | ||
|
||
# NuGet Packages Directory | ||
packages/ | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Others | ||
~$* | ||
*~ | ||
*.dbmdl | ||
*.[Pp]ublish.xml | ||
*.pfx | ||
*.publishsettings | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
UpgradeLog*.htm | ||
|
||
# ========================= | ||
# Windows detritus | ||
# ========================= | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Mac crap | ||
.DS_Store | ||
|
||
src/.vs | ||
.vscode | ||
|
||
# Cake Build | ||
/tools | ||
/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mode: ContinuousDeployment | ||
branches: {} | ||
ignore: | ||
sha: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2010-2017 Uber Creative Ltd | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Cofoundry.Plugins.Imaging.ImageSharp | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/neoc6yy7ed64td14?svg=true)](https://ci.appveyor.com/project/Cofoundry/cofoundry-plugins-imaging-imagesharp) | ||
[![NuGet](https://img.shields.io/nuget/v/Cofoundry.Plugins.Imaging.ImageSharp.svg)](https://www.nuget.org/packages/Cofoundry.Plugins.Imaging.ImageSharp/) | ||
[![Gitter](https://img.shields.io/gitter/room/cofoundry-cms/cofoundry.svg)](https://gitter.im/cofoundry-cms/cofoundry) | ||
|
||
|
||
This library is a plugin for [Cofoundry](https://www.cofoundry.org). For more information on getting started with Cofoundry check out the [Cofoundry repository](https://github.com/cofoundry-cms/cofoundry). | ||
|
||
## Overview | ||
|
||
Cofoundry does not have a default image resizing implementation and relies on plugins to add this functionality. For more info on image resizing in Cofoundry check out the [imaging documentation](https://github.com/cofoundry-cms/cofoundry/wiki/Images). | ||
|
||
This plugin uses the cross platform [ImageSharp](https://github.com/JimBobSquarePants/ImageSharp) package to resize images dynamically. | ||
|
||
***NB:** ImageSharp is still in pre-release so this is a quick rough solution to cross platform imaging. The ImageSharp package should be picked up automatically, but if not you can find it in the MyGet feed stored in the NuGet.config file.* | ||
|
||
The services register themselves automatically so no other configuration is required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Cofoundry.Plugins.Imaging.ImageSharp | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/neoc6yy7ed64td14?svg=true)](https://ci.appveyor.com/project/Cofoundry/cofoundry-plugins-imaging-imagesharp) | ||
[![NuGet](https://img.shields.io/nuget/v/Cofoundry.Plugins.Imaging.ImageSharp.svg)](https://www.nuget.org/packages/Cofoundry.Plugins.Imaging.ImageSharp/) | ||
[![Gitter](https://img.shields.io/gitter/room/cofoundry-cms/cofoundry.svg)](https://gitter.im/cofoundry-cms/cofoundry) | ||
|
||
|
||
This library is a plugin for [Cofoundry](https://www.cofoundry.org). For more information on getting started with Cofoundry check out the [Cofoundry repository](https://github.com/cofoundry-cms/cofoundry). | ||
|
||
## Overview | ||
|
||
Cofoundry does not have a default image resizing implementation and relies on plugins to add this functionality. For more info on image resizing in Cofoundry check out the [imaging documentation](https://github.com/cofoundry-cms/cofoundry/wiki/Images). | ||
|
||
This plugin uses the cross platform [ImageSharp](https://github.com/JimBobSquarePants/ImageSharp) package to resize images dynamically. | ||
|
||
***NB:** ImageSharp is still in pre-release so this is a quick rough solution to cross platform imaging. The ImageSharp package should be picked up automatically, but if not you can find it in the MyGet feed stored in the NuGet.config file.* | ||
|
||
*In addition this code is in itself in pre-release so * | ||
|
||
The services register themselves automatically so no other configuration is required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '{build}' | ||
image: Visual Studio 2017 | ||
environment: | ||
NUGET_API_KEY: | ||
secure: KBgtBksw79Z4kFehSqUePYoknzeWB8Tq8eAzSFPxDysRJCjJT3iUiCzk7OweTp0K | ||
MYGET_API_KEY: | ||
secure: JNkkCPfd2fNbhiTek4Hg4lP3Gf1IvB9xFf/Gv0pJGbw4+h8inQBaKZ6XlxpgRO44 | ||
|
||
build_script: | ||
- cmd: PowerShell -Version 2.0 .\build.ps1 -PushPackages true | ||
test: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
#tool "nuget:?package=GitVersion.CommandLine" | ||
|
||
using System.Text.RegularExpressions; | ||
|
||
////////////////////////////////////////////////////////////////////// | ||
// ARGUMENTS | ||
////////////////////////////////////////////////////////////////////// | ||
|
||
var target = Argument("target", "Default"); | ||
var configuration = Argument("configuration", "Release"); | ||
var pushPackages = Argument("PushPackages", "false") == "true"; | ||
bool isPrerelease = false; | ||
GitVersion versionInfo = null; | ||
|
||
var projectsToBuild = new string[]{ | ||
"./src/Cofoundry.Core/Cofoundry.Plugins.Imaging.ImageSharp.csproj", | ||
}; | ||
|
||
|
||
////////////////////////////////////////////////////////////////////// | ||
// PREPARATION | ||
////////////////////////////////////////////////////////////////////// | ||
|
||
//GitVersion versionInfo = null; | ||
var nugetPackageDir = Directory("./artifacts"); | ||
|
||
////////////////////////////////////////////////////////////////////// | ||
// TASKS | ||
////////////////////////////////////////////////////////////////////// | ||
|
||
Task("Clean") | ||
.Does(() => | ||
{ | ||
CleanDirectory(nugetPackageDir); | ||
CleanDirectories("./src/**/bin/" + configuration); | ||
CleanDirectories("./src/**/obj/" + configuration); | ||
}); | ||
|
||
|
||
Task("Patch-Assembly-Version") | ||
.IsDependentOn("Clean") | ||
.Does(() => | ||
{ | ||
versionInfo = GitVersion(new GitVersionSettings{ | ||
UpdateAssemblyInfo = false | ||
}); | ||
Information("Building version {0} of Cofoundry.", versionInfo.InformationalVersion); | ||
isPrerelease = !string.IsNullOrEmpty(versionInfo.PreReleaseNumber); | ||
// Patch the version number so it's picked up when dependent projects are references | ||
// as nuget dependencies. Can't find a better way to do this. | ||
// Also this needs to run before DotNetCoreRestore for some reason (cached?) | ||
var file = MakeAbsolute(File("./src/Directory.Build.props")); | ||
var xml = System.IO.File.ReadAllText(file.FullPath, Encoding.UTF8); | ||
xml = Regex.Replace(xml, @"(<Version>)(.+)(<\/Version>)", "${1}" + versionInfo.NuGetVersion +"${3}"); | ||
System.IO.File.WriteAllText(file.FullPath, xml, Encoding.UTF8); | ||
}); | ||
|
||
Task("Restore-NuGet-Packages") | ||
.IsDependentOn("Patch-Assembly-Version") | ||
.Does(() => | ||
{ | ||
foreach (var projectToBuild in projectsToBuild) | ||
{ | ||
DotNetCoreRestore(projectToBuild); | ||
} | ||
}); | ||
|
||
Task("Build") | ||
.IsDependentOn("Restore-NuGet-Packages") | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCoreBuildSettings | ||
{ | ||
Configuration = configuration, | ||
ArgumentCustomization = args => args | ||
.Append("/p:NuGetVersion=" + versionInfo.NuGetVersion) | ||
.Append("/p:AssemblyVersion=" + versionInfo.AssemblySemVer) | ||
.Append("/p:FileVersion=" + versionInfo.MajorMinorPatch + ".0") | ||
.Append("/p:InformationalVersion=" + versionInfo.InformationalVersion) | ||
.Append("/p:Copyright=" + "\"Copyright © Cofoundry.org " + DateTime.Now.Year + "\"") | ||
}; | ||
foreach (var projectToBuild in projectsToBuild) | ||
{ | ||
DotNetCoreBuild(projectToBuild, settings); | ||
} | ||
}); | ||
|
||
Task("Pack") | ||
.IsDependentOn("Build") | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCorePackSettings | ||
{ | ||
Configuration = configuration, | ||
OutputDirectory = "./artifacts/", | ||
NoBuild = true | ||
}; | ||
foreach (var projectToBuild in projectsToBuild) | ||
{ | ||
DotNetCorePack(projectToBuild, settings); | ||
} | ||
}); | ||
|
||
Task("PushNuGetPackage") | ||
.IsDependentOn("Pack") | ||
.Does(() => | ||
{ | ||
var nugets = GetFiles("./artifacts/*.nupkg"); | ||
if (pushPackages) | ||
{ | ||
Information("Pushing packages"); | ||
if (isPrerelease) | ||
{ | ||
NuGetPush(nugets, new NuGetPushSettings { | ||
Source = "https://www.myget.org/F/cofoundry/api/v2/package", | ||
ApiKey = EnvironmentVariable("MYGET_API_KEY") | ||
}); | ||
} | ||
else | ||
{ | ||
NuGetPush(nugets, new NuGetPushSettings { | ||
Source = "https://nuget.org/", | ||
ApiKey = EnvironmentVariable("NUGET_API_KEY") | ||
}); | ||
} | ||
} | ||
}); | ||
|
||
////////////////////////////////////////////////////////////////////// | ||
// TASK TARGETS | ||
////////////////////////////////////////////////////////////////////// | ||
|
||
Task("Default").IsDependentOn("PushNuGetPackage"); | ||
|
||
////////////////////////////////////////////////////////////////////// | ||
// EXECUTION | ||
////////////////////////////////////////////////////////////////////// | ||
|
||
RunTarget(target); |
Oops, something went wrong.