Skip to content

Commit d3843fc

Browse files
author
Joel Mitchell
committed
Initial commit
0 parents  commit d3843fc

23 files changed

+1353
-0
lines changed

.gitignore

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
11+
[Dd]ebug/
12+
[Rr]elease/
13+
x64/
14+
build/
15+
[Bb]in/
16+
[Oo]bj/
17+
18+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
19+
!packages/*/build/
20+
21+
# MSTest test Results
22+
[Tt]est[Rr]esult*/
23+
[Bb]uild[Ll]og.*
24+
25+
*_i.c
26+
*_p.c
27+
*.ilk
28+
*.meta
29+
*.obj
30+
*.pch
31+
*.pdb
32+
*.pgc
33+
*.pgd
34+
*.rsp
35+
*.sbr
36+
*.tlb
37+
*.tli
38+
*.tlh
39+
*.tmp
40+
*.tmp_proj
41+
*.log
42+
*.vspscc
43+
*.vssscc
44+
.builds
45+
*.pidb
46+
*.log
47+
*.scc
48+
49+
# Visual C++ cache files
50+
ipch/
51+
*.aps
52+
*.ncb
53+
*.opensdf
54+
*.sdf
55+
*.cachefile
56+
57+
# Visual Studio profiler
58+
*.psess
59+
*.vsp
60+
*.vspx
61+
62+
# Guidance Automation Toolkit
63+
*.gpState
64+
65+
# ReSharper is a .NET coding add-in
66+
_ReSharper*/
67+
*.[Rr]e[Ss]harper
68+
69+
# TeamCity is a build add-in
70+
_TeamCity*
71+
72+
# DotCover is a Code Coverage Tool
73+
*.dotCover
74+
75+
# NCrunch
76+
*.ncrunch*
77+
.*crunch*.local.xml
78+
79+
# Installshield output folder
80+
[Ee]xpress/
81+
82+
# DocProject is a documentation generator add-in
83+
DocProject/buildhelp/
84+
DocProject/Help/*.HxT
85+
DocProject/Help/*.HxC
86+
DocProject/Help/*.hhc
87+
DocProject/Help/*.hhk
88+
DocProject/Help/*.hhp
89+
DocProject/Help/Html2
90+
DocProject/Help/html
91+
92+
# Click-Once directory
93+
publish/
94+
95+
# Publish Web Output
96+
*.Publish.xml
97+
*.pubxml
98+
99+
# NuGet Packages Directory
100+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
101+
packages/
102+
103+
# Windows Azure Build Output
104+
csx
105+
*.build.csdef
106+
107+
# Windows Store app package directory
108+
AppPackages/
109+
110+
# Others
111+
sql/
112+
*.Cache
113+
ClientBin/
114+
[Ss]tyle[Cc]op.*
115+
~$*
116+
*~
117+
*.dbmdl
118+
*.[Pp]ublish.xml
119+
*.pfx
120+
*.publishsettings
121+
122+
# RIA/Silverlight projects
123+
Generated_Code/
124+
125+
# Backup & report files from converting an old project file to a newer
126+
# Visual Studio version. Backup files are not needed, because we have git ;-)
127+
_UpgradeReport_Files/
128+
Backup*/
129+
UpgradeLog*.XML
130+
UpgradeLog*.htm
131+
132+
# SQL Server files
133+
App_Data/*.mdf
134+
App_Data/*.ldf
135+
136+
# =========================
137+
# Windows detritus
138+
# =========================
139+
140+
# Windows image file caches
141+
Thumbs.db
142+
ehthumbs.db
143+
144+
# Folder config file
145+
Desktop.ini
146+
147+
# Recycle Bin used on file shares
148+
$RECYCLE.BIN/
149+
150+
# Mac crap
151+
.DS_Store
152+
153+
src/.vs
154+
155+
# Cake Build
156+
/tools
157+
/artifacts

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 cofoundry-cms
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

appveyor.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '{build}'
2+
image: Visual Studio 2015
3+
branches:
4+
only:
5+
- master
6+
- develop
7+
environment:
8+
NUGET_API_KEY:
9+
secure: KBgtBksw79Z4kFehSqUePYoknzeWB8Tq8eAzSFPxDysRJCjJT3iUiCzk7OweTp0K
10+
build_script:
11+
- cmd: PowerShell -Version 2.0 .\build.ps1 -PushPackages true
12+
test: off

build.cake

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
//////////////////////////////////////////////////////////////////////
2+
// ARGUMENTS
3+
//////////////////////////////////////////////////////////////////////
4+
5+
var target = Argument("target", "Default");
6+
var configuration = Argument("configuration", "Release");
7+
var pushPackages = Argument("PushPackages", "false") == "true";
8+
var build = Convert.ToInt32(EnvironmentVariable("APPVEYOR_BUILD_VERSION") ?? "0");
9+
var semVersion = "0.1.0";
10+
var assemblyVersion = semVersion + "." + build;
11+
var nugetVersion = semVersion + "-beta" + build.ToString("D4");
12+
13+
//////////////////////////////////////////////////////////////////////
14+
// PREPARATION
15+
//////////////////////////////////////////////////////////////////////
16+
17+
//GitVersion versionInfo = null;
18+
var nugetPackageDir = Directory("./artifacts");
19+
20+
//////////////////////////////////////////////////////////////////////
21+
// TASKS
22+
//////////////////////////////////////////////////////////////////////
23+
24+
Task("Clean")
25+
.Does(() =>
26+
{
27+
CleanDirectory(nugetPackageDir);
28+
CleanDirectories("./src/**/bin/" + configuration);
29+
CleanDirectories("./src/**/obj/" + configuration);
30+
});
31+
32+
Task("Restore-NuGet-Packages")
33+
.IsDependentOn("Clean")
34+
.Does(() =>
35+
{
36+
NuGetRestore("./src/Cofoundry.Plugins.BackgroundTasks.Hangfire.sln");
37+
});
38+
39+
Task("Patch-Assembly-Version")
40+
.IsDependentOn("Clean")
41+
.Does(() =>
42+
{
43+
// GitVersion(new GitVersionSettings{
44+
// UpdateAssemblyInfo = false,
45+
// OutputType = GitVersionOutput.BuildServer
46+
// });
47+
48+
// versionInfo = GitVersion(new GitVersionSettings{ OutputType = GitVersionOutput.Json });
49+
50+
Information("Building version {0} of Cofoundry.Plugins.DependencyInjection.Autofac.", nugetVersion);
51+
52+
var file = "./src/SolutionInfo.cs";
53+
CreateAssemblyInfo(file, new AssemblyInfoSettings {
54+
Version = semVersion,
55+
FileVersion = assemblyVersion,
56+
InformationalVersion = nugetVersion,
57+
Copyright = "Copyright © Cofoundry.org 2016"
58+
});
59+
});
60+
61+
Task("Build")
62+
.IsDependentOn("Restore-NuGet-Packages")
63+
.IsDependentOn("Patch-Assembly-Version")
64+
.Does(() =>
65+
{
66+
if(IsRunningOnWindows())
67+
{
68+
// Use MSBuild
69+
MSBuild("./src/Cofoundry.Plugins.BackgroundTasks.Hangfire.sln", settings => settings.SetConfiguration(configuration));
70+
}
71+
// Git Link: http://www.michael-whelan.net/continuous-delivery-github-cake-gittools-appveyor/
72+
});
73+
74+
Task("Pack")
75+
.IsDependentOn("Build")
76+
.Does(() =>
77+
{
78+
var nugetFilePaths = GetFiles("./src/Cofoundry.*/*.nuspec");
79+
80+
var nuGetPackSettings = new NuGetPackSettings
81+
{
82+
Version = nugetVersion,
83+
OutputDirectory = nugetPackageDir,
84+
Verbosity = NuGetVerbosity.Detailed,
85+
ArgumentCustomization = args => args.Append("-Prop Configuration=" + configuration)
86+
};
87+
88+
foreach (var path in nugetFilePaths)
89+
{
90+
Information("Packing:" + path);
91+
NuGetPack(path, nuGetPackSettings);
92+
}
93+
});
94+
95+
Task("PushNuGetPackage")
96+
.IsDependentOn("Pack")
97+
.Does(() =>
98+
{
99+
var nugets = GetFiles("./artifacts/*.nupkg");
100+
101+
if (pushPackages)
102+
{
103+
Information("Pushing packages");
104+
105+
NuGetPush(nugets, new NuGetPushSettings {
106+
Source = "https://nuget.org/",
107+
ApiKey = EnvironmentVariable("NUGET_API_KEY")
108+
});
109+
}
110+
});
111+
112+
//////////////////////////////////////////////////////////////////////
113+
// TASK TARGETS
114+
//////////////////////////////////////////////////////////////////////
115+
116+
Task("Default").IsDependentOn("PushNuGetPackage");
117+
118+
//////////////////////////////////////////////////////////////////////
119+
// EXECUTION
120+
//////////////////////////////////////////////////////////////////////
121+
122+
RunTarget(target);

0 commit comments

Comments
 (0)