albacore 1.0.0 → 2.0.0.rc.1
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.
- data/.gitignore +6 -21
- data/.travis.yml +31 -12
- data/Gemfile +14 -6
- data/Guardfile +1 -3
- data/README.md +200 -47
- data/Rakefile +9 -19
- data/albacore.gemspec +33 -23
- data/lib/albacore.rb +3 -47
- data/lib/albacore/albacore_module.rb +57 -0
- data/lib/albacore/application.rb +43 -0
- data/lib/albacore/cmd_config.rb +66 -0
- data/lib/albacore/config_dsl.rb +55 -0
- data/lib/albacore/cross_platform_cmd.rb +291 -0
- data/lib/albacore/dsl.rb +90 -0
- data/lib/albacore/errors/command_failed_error.rb +11 -0
- data/lib/albacore/errors/command_not_found_error.rb +13 -0
- data/lib/albacore/errors/unfilled_property_error.rb +14 -0
- data/lib/albacore/ext/README.md +12 -0
- data/lib/albacore/ext/teamcity.rb +64 -0
- data/lib/albacore/facts.rb +25 -0
- data/lib/albacore/logging.rb +32 -0
- data/lib/albacore/nuget_model.rb +387 -0
- data/lib/albacore/paths.rb +34 -0
- data/lib/albacore/project.rb +141 -0
- data/lib/albacore/semver.rb +5 -0
- data/lib/albacore/task_types/asmver.rb +72 -0
- data/lib/albacore/task_types/asmver/cpp.rb +20 -0
- data/lib/albacore/task_types/asmver/cs.rb +17 -0
- data/lib/albacore/task_types/asmver/engine.rb +126 -0
- data/lib/albacore/task_types/asmver/file_generator.rb +45 -0
- data/lib/albacore/task_types/asmver/fs.rb +37 -0
- data/lib/albacore/task_types/asmver/vb.rb +27 -0
- data/lib/albacore/task_types/build.rb +192 -0
- data/lib/albacore/task_types/nugets_authentication.rb +9 -0
- data/lib/albacore/task_types/nugets_pack.rb +378 -0
- data/lib/albacore/task_types/nugets_restore.rb +138 -0
- data/lib/albacore/task_types/test_runner.rb +39 -0
- data/lib/albacore/tasks/README.md +16 -0
- data/lib/albacore/tasks/albasemver.rb +49 -0
- data/lib/albacore/tasks/projectlint.rb +81 -0
- data/lib/albacore/tasks/versionizer.rb +65 -0
- data/lib/albacore/tools/fluent_migrator.rb +177 -0
- data/lib/albacore/tools/restore_hint_paths.rb +112 -0
- data/lib/albacore/version.rb +3 -3
- data/spec/Rakefile +5 -0
- data/spec/albacore_spec.rb +12 -0
- data/spec/asmver_spec.rb +151 -0
- data/spec/asmver_task_spec.rb +32 -0
- data/spec/build_spec.rb +60 -0
- data/spec/config_dsl_spec.rb +83 -0
- data/spec/cross_platform_cmd_spec.rb +65 -0
- data/spec/dsl_spec.rb +39 -0
- data/spec/ext_teamcity_spec.rb +71 -0
- data/spec/facts_spec.rb +7 -0
- data/spec/nuget_model_spec.rb +401 -0
- data/spec/nugets_pack_spec.rb +231 -0
- data/spec/nugets_restore_spec.rb +55 -0
- data/spec/project_spec.rb +26 -0
- data/spec/projectlint/added_but_not_on_filesystem/aproject.csproj +29 -0
- data/spec/projectlint/correct/File.cs +1 -0
- data/spec/projectlint/correct/Image.txt +1 -0
- data/spec/projectlint/correct/MyHeavy.heavy +1 -0
- data/spec/projectlint/correct/Schema.xsd +1 -0
- data/spec/projectlint/correct/SubFolder/AnotherFile.cs +1 -0
- data/spec/projectlint/correct/aproject.csproj +29 -0
- data/spec/projectlint/on_filesystem_but_not_added/File.cs +1 -0
- data/spec/projectlint/on_filesystem_but_not_added/Image.txt +1 -0
- data/spec/projectlint/on_filesystem_but_not_added/aproject.csproj +11 -0
- data/spec/projectlint_spec.rb +77 -0
- data/spec/smoke_spec.rb +55 -0
- data/spec/spec_helper.rb +19 -20
- data/spec/support/Nuget/NuGet.exe +0 -0
- data/spec/support/echo/FSharp.Core.dll +0 -0
- data/spec/support/echo/FSharp.Core.xml +10517 -0
- data/spec/support/echo/echo.XML +12 -0
- data/spec/support/echo/echo.exe +0 -0
- data/spec/support/echo/echo.exe.config +17 -0
- data/spec/support/echo/echo.pdb +0 -0
- data/spec/support/returnstatus/FSharp.Core.dll +0 -0
- data/spec/support/returnstatus/FSharp.Core.xml +10517 -0
- data/spec/support/returnstatus/returnstatus.XML +12 -0
- data/spec/support/returnstatus/returnstatus.exe +0 -0
- data/spec/support/returnstatus/returnstatus.exe.config +17 -0
- data/spec/support/returnstatus/returnstatus.pdb +0 -0
- data/spec/support/sh_interceptor.rb +83 -0
- data/spec/testdata/.gitignore +5 -0
- data/spec/testdata/DebugProject/.gitignore +1 -0
- data/spec/testdata/DebugProject/Degbu.fsproj +57 -0
- data/spec/testdata/DebugProject/Degbu.sln +20 -0
- data/spec/testdata/DebugProject/Gemfile +1 -0
- data/spec/testdata/DebugProject/Library1.fs +4 -0
- data/spec/testdata/DebugProject/Rakefile +22 -0
- data/spec/testdata/EmptyProject/EmptyProject.csproj +39 -0
- data/spec/{assemblyinfo → testdata/EmptyProject/Properties}/AssemblyInfo.cs +5 -5
- data/spec/testdata/Gemfile +1 -0
- data/spec/testdata/NuGet.exe +0 -0
- data/spec/testdata/Project/Library1.fs +4 -0
- data/spec/testdata/Project/Project.fsproj +52 -0
- data/spec/testdata/Project/Project.sln +20 -0
- data/spec/testdata/Project/packages.config +6 -0
- data/spec/testdata/Rakefile +22 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Library.fs +6 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Sample.Commands.fsproj +78 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Script.fsx +8 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/packages.config +6 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Library.fs +3 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Sample.Core.fsproj +59 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Script.fsx +8 -0
- data/spec/testdata/TestingDependencies/Sample.Core/packages.config +4 -0
- data/spec/testdata/TestingDependencies/Sample.sln +26 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.dll +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.optdata +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.sigdata +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.xml +8748 -0
- data/spec/testdata/example.nuspec +14 -0
- data/spec/testdata/example.symbols.nuspec +21 -0
- data/spec/tools/fluent_migrator_spec.rb +80 -0
- metadata +303 -212
- data/.bundle/config +0 -2
- data/.rspec +0 -2
- data/CONTRIBUTING.md +0 -87
- data/LICENSE +0 -21
- data/lib/albacore/albacoretask.rb +0 -50
- data/lib/albacore/aspnetcompiler.rb +0 -80
- data/lib/albacore/assemblyinfo.rb +0 -163
- data/lib/albacore/assemblyinfolanguages/assemblyinfoengine.rb +0 -54
- data/lib/albacore/assemblyinfolanguages/cppcliengine.rb +0 -18
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +0 -15
- data/lib/albacore/assemblyinfolanguages/fsharpengine.rb +0 -23
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +0 -15
- data/lib/albacore/config/aspnetcompilerconfig.rb +0 -30
- data/lib/albacore/config/assemblyinfoconfig.rb +0 -18
- data/lib/albacore/config/config.rb +0 -22
- data/lib/albacore/config/cscconfig.rb +0 -28
- data/lib/albacore/config/docuconfig.rb +0 -19
- data/lib/albacore/config/execconfig.rb +0 -19
- data/lib/albacore/config/fluentmigratorconfig.rb +0 -19
- data/lib/albacore/config/ilmergeconfig.rb +0 -19
- data/lib/albacore/config/msbuildconfig.rb +0 -29
- data/lib/albacore/config/mspecconfig.rb +0 -19
- data/lib/albacore/config/mstestconfig.rb +0 -19
- data/lib/albacore/config/nantconfig.rb +0 -18
- data/lib/albacore/config/nchurnconfig.rb +0 -19
- data/lib/albacore/config/ncoverconsoleconfig.rb +0 -19
- data/lib/albacore/config/ncoverreportconfig.rb +0 -18
- data/lib/albacore/config/ndependconfig.rb +0 -19
- data/lib/albacore/config/netversion.rb +0 -28
- data/lib/albacore/config/nugetinstallconfig.rb +0 -18
- data/lib/albacore/config/nugetpackconfig.rb +0 -18
- data/lib/albacore/config/nugetpushconfig.rb +0 -18
- data/lib/albacore/config/nugetupdateconfig.rb +0 -18
- data/lib/albacore/config/nunitconfig.rb +0 -19
- data/lib/albacore/config/nuspecconfig.rb +0 -18
- data/lib/albacore/config/plinkconfig.rb +0 -18
- data/lib/albacore/config/specflowconfig.rb +0 -18
- data/lib/albacore/config/sqlcmdconfig.rb +0 -18
- data/lib/albacore/config/unzipconfig.rb +0 -19
- data/lib/albacore/config/xbuildconfig.rb +0 -18
- data/lib/albacore/config/xunitconfig.rb +0 -18
- data/lib/albacore/config/zipdirectoryconfig.rb +0 -18
- data/lib/albacore/csc.rb +0 -77
- data/lib/albacore/docu.rb +0 -38
- data/lib/albacore/exec.rb +0 -20
- data/lib/albacore/fluentmigrator.rb +0 -69
- data/lib/albacore/ilmerge.rb +0 -38
- data/lib/albacore/msbuild.rb +0 -55
- data/lib/albacore/mspec.rb +0 -39
- data/lib/albacore/mstest.rb +0 -47
- data/lib/albacore/nant.rb +0 -41
- data/lib/albacore/nchurn.rb +0 -49
- data/lib/albacore/ncoverconsole.rb +0 -56
- data/lib/albacore/ncoverreport.rb +0 -40
- data/lib/albacore/ncoverreports.rb +0 -16
- data/lib/albacore/ncoverreports/assemblyfilter.rb +0 -10
- data/lib/albacore/ncoverreports/branchcoverage.rb +0 -10
- data/lib/albacore/ncoverreports/classfilter.rb +0 -9
- data/lib/albacore/ncoverreports/codecoveragebase.rb +0 -27
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +0 -23
- data/lib/albacore/ncoverreports/documentfilter.rb +0 -9
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +0 -9
- data/lib/albacore/ncoverreports/methodcoverage.rb +0 -10
- data/lib/albacore/ncoverreports/methodfilter.rb +0 -9
- data/lib/albacore/ncoverreports/namespacefilter.rb +0 -9
- data/lib/albacore/ncoverreports/reportbase.rb +0 -23
- data/lib/albacore/ncoverreports/reportfilterbase.rb +0 -29
- data/lib/albacore/ncoverreports/summaryreport.rb +0 -9
- data/lib/albacore/ncoverreports/symbolcoverage.rb +0 -9
- data/lib/albacore/ndepend.rb +0 -33
- data/lib/albacore/nugetinstall.rb +0 -62
- data/lib/albacore/nugetpack.rb +0 -50
- data/lib/albacore/nugetpush.rb +0 -40
- data/lib/albacore/nugetupdate.rb +0 -50
- data/lib/albacore/nunit.rb +0 -46
- data/lib/albacore/nuspec.rb +0 -180
- data/lib/albacore/output.rb +0 -105
- data/lib/albacore/plink.rb +0 -50
- data/lib/albacore/specflow.rb +0 -30
- data/lib/albacore/sqlcmd.rb +0 -67
- data/lib/albacore/support/attrmethods.rb +0 -33
- data/lib/albacore/support/createtask.rb +0 -50
- data/lib/albacore/support/failure.rb +0 -15
- data/lib/albacore/support/logging.rb +0 -38
- data/lib/albacore/support/openstruct.rb +0 -13
- data/lib/albacore/support/platform.rb +0 -25
- data/lib/albacore/support/runcommand.rb +0 -45
- data/lib/albacore/support/updateattributes.rb +0 -13
- data/lib/albacore/support/yamlconfig.rb +0 -18
- data/lib/albacore/unzip.rb +0 -42
- data/lib/albacore/xbuild.rb +0 -41
- data/lib/albacore/xunit.rb +0 -44
- data/lib/albacore/zipdirectory.rb +0 -106
- data/spec/albacoremodel_spec.rb +0 -52
- data/spec/aspnetcompiler_spec.rb +0 -84
- data/spec/assemblyinfo_spec.rb +0 -209
- data/spec/attrmethods_spec.rb +0 -135
- data/spec/config_spec.rb +0 -32
- data/spec/createtask_spec.rb +0 -234
- data/spec/csc_spec.rb +0 -86
- data/spec/docu_spec.rb +0 -31
- data/spec/exec_spec.rb +0 -25
- data/spec/fluentmigrator_spec.rb +0 -88
- data/spec/ilmerge_spec.rb +0 -35
- data/spec/msbuild_spec.rb +0 -55
- data/spec/mspec_spec.rb +0 -30
- data/spec/mstest_spec.rb +0 -35
- data/spec/nant_spec.rb +0 -40
- data/spec/nchurn_spec.rb +0 -80
- data/spec/ncoverconsole_spec.rb +0 -80
- data/spec/ncoverreport_spec.rb +0 -139
- data/spec/ndepend_spec.rb +0 -26
- data/spec/netversion_spec.rb +0 -51
- data/spec/nugetinstall_spec.rb +0 -59
- data/spec/nugetpack_spec.rb +0 -49
- data/spec/nugetpush_spec.rb +0 -39
- data/spec/nugetupdate_spec.rb +0 -49
- data/spec/nunit_spec.rb +0 -35
- data/spec/nuspec/nuspec.xsd +0 -84
- data/spec/nuspec_spec.rb +0 -74
- data/spec/output/bar/bar.txt +0 -0
- data/spec/output/baz.txt +0 -0
- data/spec/output/erb.txt +0 -1
- data/spec/output/foo/foo/foo.txt +0 -0
- data/spec/output_spec.rb +0 -85
- data/spec/patch/system_patch.rb +0 -12
- data/spec/platform_spec.rb +0 -15
- data/spec/plink_spec.rb +0 -56
- data/spec/runcommand_spec.rb +0 -92
- data/spec/specflow_spec.rb +0 -30
- data/spec/sqlcmd_spec.rb +0 -66
- data/spec/unzip_spec.rb +0 -56
- data/spec/xbuild_spec.rb +0 -40
- data/spec/xunit_spec.rb +0 -30
- data/spec/yaml/test.yml +0 -3
- data/spec/yamlconfig_spec.rb +0 -53
- data/spec/zip/baz.txt +0 -0
- data/spec/zip/foo/bar/bar.txt +0 -0
- data/spec/zip/foo/foo.txt +0 -0
- data/spec/zip_spec.rb +0 -97
data/.gitignore
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
*.swp
|
|
2
|
-
*~
|
|
3
|
-
.idea
|
|
4
|
-
|
|
5
1
|
Gemfile.lock
|
|
6
|
-
|
|
2
|
+
tmp/
|
|
3
|
+
*.swp
|
|
7
4
|
pkg/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_ReSharper.*
|
|
13
|
-
*.csproj.user
|
|
14
|
-
*.resharper.user
|
|
15
|
-
*.resharper
|
|
16
|
-
*.suo
|
|
17
|
-
*.cache
|
|
18
|
-
~$*
|
|
19
|
-
*.tmp
|
|
20
|
-
*.eprj
|
|
21
|
-
*.bkp
|
|
5
|
+
.DS_Store
|
|
6
|
+
spec/testdata/TestingDependencies/Sample.Commands/Sample.Commands.nuspec
|
|
7
|
+
spec/testdata/Project/Sample.Nuget.nuspec
|
|
8
|
+
spec/testdata/TestingDependencies/Sample.Core/Sample.Core.nuspec
|
|
22
9
|
|
|
23
|
-
/spec/support/Tools/NDepend-v2.12/NDependProLicense.xml
|
|
24
|
-
Gemfile.lock
|
data/.travis.yml
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
+
# kisses and hugs to https://raw.github.com/NancyFx/Nancy/master/.travis.yml
|
|
2
|
+
|
|
1
3
|
language: ruby
|
|
4
|
+
|
|
5
|
+
install:
|
|
6
|
+
- sudo bash -c "echo deb http://badgerports.org lucid main >> /etc/apt/sources.list"
|
|
7
|
+
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E1FAD0C
|
|
8
|
+
- sudo apt-get update
|
|
9
|
+
- sudo apt-get install mono-devel mono-gmcs mono-vbnc
|
|
10
|
+
- sudo apt-get install gettext
|
|
11
|
+
- sudo wget -q -P "/opt" "http://samples.nancyfx.org/content/mono-3.0.12-x64-bin.tar.bz2"
|
|
12
|
+
- bundle install
|
|
13
|
+
- echo set -e >> ./travis.sh
|
|
14
|
+
- echo set -o pipefail >> ./travis.sh
|
|
15
|
+
- echo echo Running on Mono 3.x >> ./travis.sh
|
|
16
|
+
- echo sudo tar xk -C "/opt" -f /opt/mono-3.0.12-x64-bin.tar.bz2 >> ./travis.sh
|
|
17
|
+
- echo export PATH="/opt/mono/bin:$PATH" >> ./travis.sh
|
|
18
|
+
- echo export LD_LIBRARY_PATH="/opt/mono/bin" >> ./travis.sh
|
|
19
|
+
- echo bundle exec rake spec >> ./travis.sh
|
|
20
|
+
- chmod +x ./travis.sh
|
|
21
|
+
|
|
22
|
+
script: ./travis.sh
|
|
23
|
+
|
|
2
24
|
rvm:
|
|
3
|
-
- 1.9.3
|
|
4
|
-
- 2.0.0
|
|
5
|
-
- jruby
|
|
6
|
-
|
|
7
|
-
|
|
25
|
+
- 1.9.3
|
|
26
|
+
- 2.0.0
|
|
27
|
+
# - jruby
|
|
28
|
+
|
|
29
|
+
branches:
|
|
30
|
+
only: clean_slate
|
|
31
|
+
|
|
8
32
|
notifications:
|
|
9
|
-
email:
|
|
33
|
+
email: henrik@haf.se
|
|
34
|
+
|
|
10
35
|
gemfile: Gemfile
|
|
11
|
-
deploy:
|
|
12
|
-
provider: rubygems
|
|
13
|
-
api_key:
|
|
14
|
-
secure: c8WYx8M7i68fZzucth/eI7kj0OX55f6te5Toz88HhDRYdycJ7xu6GJBErOGQBK+26cLnu2sfi//TJXOBayCm7mluTcNSoQMrYalm9s5+oCNyNKbMCZtRZ/kYqHZY4cvOobqKeTTrTJH5puD3PUFbCqat3s4HKrQUjCthfd6ZUeY=
|
|
15
|
-
on:
|
|
16
|
-
tags: true
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
#ruby=1.9.3
|
|
2
|
+
#ruby-gemset=albacore_clean_slate
|
|
3
|
+
|
|
4
|
+
source "http://rubygems.org"
|
|
5
|
+
|
|
6
|
+
# Windows Rubies (RubyInstaller)
|
|
7
|
+
platforms :mswin, :mingw do
|
|
8
|
+
gem 'wdm' # for listening to Windows Directory Notifications
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# needed to do development and read the version of albacore
|
|
12
|
+
gem 'nokogiri', '~>1.5'
|
|
13
|
+
|
|
14
|
+
gemspec
|
data/Guardfile
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# A sample Guardfile
|
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
guard 'rspec', :version => 2 do
|
|
3
|
+
guard 'rspec' do
|
|
5
4
|
watch(%r{^spec/.+_spec\.rb$})
|
|
6
5
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
|
7
|
-
watch('spec/spec_helper.rb') { "spec" }
|
|
8
6
|
end
|
|
9
7
|
|
data/README.md
CHANGED
|
@@ -1,47 +1,200 @@
|
|
|
1
|
-
# Albacore
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
# Albacore Clean Slate
|
|
2
|
+
|
|
3
|
+
[](http://travis-ci.org/Albacore/albacore)
|
|
4
|
+
|
|
5
|
+
This branch is the next official version. It is currently being used for
|
|
6
|
+
numerous builds for us and is free of known bugs. It works on RMI 1.9.3.
|
|
7
|
+
|
|
8
|
+
## getting started
|
|
9
|
+
|
|
10
|
+
In a command prompt, run:
|
|
11
|
+
|
|
12
|
+
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
|
|
13
|
+
|
|
14
|
+
Then start a new powershell, cygwin or mingw32 shell. You can now install the
|
|
15
|
+
Ruby framework:
|
|
16
|
+
|
|
17
|
+
cinst ruby.devkit
|
|
18
|
+
|
|
19
|
+
Now, restart your shell or reload its path variable. You now have rake
|
|
20
|
+
installed. Now you can install Albacore, the collection of tasktypes, tasks and
|
|
21
|
+
extension points aimed to make your life as a .Net developer easier:
|
|
22
|
+
|
|
23
|
+
gem install bundler
|
|
24
|
+
|
|
25
|
+
Bundler is a tool that fetches gems for you. Now, specify what ruby gems your
|
|
26
|
+
build will use. Create a new file, named `Gemfile`. This file should look like
|
|
27
|
+
this:
|
|
28
|
+
|
|
29
|
+
source 'http://rubygems.org'
|
|
30
|
+
gem "albacore", :git => "git://github.com/Albacore/albacore.git", :branch => 'clean_slate'
|
|
31
|
+
|
|
32
|
+
Now, install albacore from this repository by running:
|
|
33
|
+
|
|
34
|
+
bundle
|
|
35
|
+
|
|
36
|
+
In order to build your project, you need to create a `Rakefile`, with contents
|
|
37
|
+
like these:
|
|
38
|
+
|
|
39
|
+
``` ruby
|
|
40
|
+
require 'bundler/setup'
|
|
41
|
+
|
|
42
|
+
require 'albacore'
|
|
43
|
+
require 'albacore/tasks/versionizer'
|
|
44
|
+
require 'albacore/ext/teamcity'
|
|
45
|
+
|
|
46
|
+
Albacore::Tasks::Versionizer.new :versioning
|
|
47
|
+
|
|
48
|
+
desc 'Perform fast build (warn: doesn't d/l deps)'
|
|
49
|
+
build :quick_build do |b|
|
|
50
|
+
b.logging = 'detailed'
|
|
51
|
+
b.sln = 'src/MyProj.sln'
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
desc 'restore all nugets as per the packages.config files'
|
|
55
|
+
nugets_restore :restore do |p|
|
|
56
|
+
p.out = 'src/packages'
|
|
57
|
+
p.exe = 'buildsupport/NuGet.exe'
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
desc 'Perform full build'
|
|
61
|
+
build :build => [:versioning, :restore] do |b|
|
|
62
|
+
b.sln = 'src/MyProj.sln'
|
|
63
|
+
# alt: b.file = 'src/MyProj.sln'
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
directory 'build/pkg'
|
|
67
|
+
|
|
68
|
+
desc 'package nugets - finds all projects and package them'
|
|
69
|
+
nugets_pack :create_nugets => ['build/pkg', :versioning, :build] do |p|
|
|
70
|
+
p.files = FileList['src/**/*.{csproj,fsproj,nuspec}'].
|
|
71
|
+
exclude(/Tests/)
|
|
72
|
+
p.out = 'build/pkg'
|
|
73
|
+
p.exe = 'buildsupport/NuGet.exe'
|
|
74
|
+
p.with_metadata do |m|
|
|
75
|
+
m.description = 'A cool nuget'
|
|
76
|
+
m.authors = 'Henrik'
|
|
77
|
+
m.version = ENV['NUGET_VERSION']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
task :default => :create_nugets
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
You can now run:
|
|
85
|
+
|
|
86
|
+
rake
|
|
87
|
+
|
|
88
|
+
## Ideas:
|
|
89
|
+
|
|
90
|
+
When building multiple configurations,
|
|
91
|
+
Build tasks should be invoked with different parameters
|
|
92
|
+
According to the graph of tasks to be executed
|
|
93
|
+
|
|
94
|
+
``` ruby
|
|
95
|
+
require 'albacore'
|
|
96
|
+
|
|
97
|
+
Albacore.vary_by_parameters do |params|
|
|
98
|
+
# write to dynamic method
|
|
99
|
+
params.Configuration = ['Debug-Tests', 'Release']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
build :b do |b|
|
|
103
|
+
b.vary_by_param 'Configuration'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
nugets_pack :p => :b do |p|
|
|
107
|
+
# ...
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
task :default => :p
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Creating two runs
|
|
114
|
+
* `:b[Debug-Tests] => :p => :default` and
|
|
115
|
+
* `:b[Release] => :p => :default`
|
|
116
|
+
|
|
117
|
+
where only :b is invoked twice, but :p and :default are only invoked only once
|
|
118
|
+
each.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
When building services and/or web sites,
|
|
123
|
+
The bundling task_type should take care of packaging for deployment
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Docs: build
|
|
127
|
+
|
|
128
|
+
TBD
|
|
129
|
+
|
|
130
|
+
### Docs: nugets_pack
|
|
131
|
+
|
|
132
|
+
TBD
|
|
133
|
+
|
|
134
|
+
### Docs: nugets_restore
|
|
135
|
+
|
|
136
|
+
TBD
|
|
137
|
+
|
|
138
|
+
### Docs: asmver
|
|
139
|
+
|
|
140
|
+
Generate a single file with assembly attributes. Code comments in example below
|
|
141
|
+
mention output in F#.
|
|
142
|
+
|
|
143
|
+
``` ruby
|
|
144
|
+
asmver :asmver do |a|
|
|
145
|
+
a.file_path = 'src/Version.fs' # required, no default
|
|
146
|
+
a.namespace = 'Hello.World' # required, no default
|
|
147
|
+
# optional
|
|
148
|
+
a.attributes assembly_title: 'Hello.World', # generates: [<AssemblyTitle("Hello.World")>]
|
|
149
|
+
assembly_version: '0.1.2', # generates: [<AssemblyVersion("0.1.2")>]
|
|
150
|
+
my_product_attr: 'Hello world', # generates: [<MyProductAttr("Hello World")>]
|
|
151
|
+
a.out = StringIO.new # optional, don't use it this way: takes an IO/Stream
|
|
152
|
+
end
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Docs: test_runner
|
|
156
|
+
|
|
157
|
+
TBD
|
|
158
|
+
|
|
159
|
+
### Docs: nugets_authentication
|
|
160
|
+
|
|
161
|
+
TBD
|
|
162
|
+
|
|
163
|
+
### Docs: csprojfiles
|
|
164
|
+
|
|
165
|
+
Checks the difference between the filesystem and the files referenced in a
|
|
166
|
+
csproj, to make sure that they match. Run as a part of a CI build.
|
|
167
|
+
|
|
168
|
+
``` ruby
|
|
169
|
+
desc "Check the difference between the filesystem and the files referenced in a csproj"
|
|
170
|
+
csprojfiles do |f|
|
|
171
|
+
# Files to ignore
|
|
172
|
+
# for instance if you have source control specific files that are not supposed to be in the project
|
|
173
|
+
f.ignore_files = [/.*\.srccontrol/]
|
|
174
|
+
f.project = "src/MyMvcSite/MyMvcSite.csproj"
|
|
175
|
+
end
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
When you run this task it will report any differences between the filesystem and
|
|
179
|
+
the csproj file.
|
|
180
|
+
|
|
181
|
+
Why is this important? It's important to know what resources will be deployed.
|
|
182
|
+
For instance if you have added an image. If you forgot to include the image in
|
|
183
|
+
the .csproj, it will show up while developing but not when you do a web
|
|
184
|
+
deployment (i.e. a release).
|
|
185
|
+
|
|
186
|
+
It could also be that you have deleted a file, but forgotten to save the project
|
|
187
|
+
when you send your latest commit to source control…
|
|
188
|
+
|
|
189
|
+
How do you use it? The best way is to have it on a CI server in order to get a
|
|
190
|
+
notification whenever it detects deviations.
|
|
191
|
+
|
|
192
|
+
The task will fail with a message and rake will return with an non zero exit
|
|
193
|
+
code. For instance if a file is missing from csproj and another from the
|
|
194
|
+
filesystem:
|
|
195
|
+
|
|
196
|
+
- Files in src/MyMvcSite/MyMvcSite.csproj but not on filesystem:
|
|
197
|
+
file_missing_on_filesystem.cshtml
|
|
198
|
+
+ Files not in src/MyMvcSite/MyMvcSite.csproj but on filesystem:
|
|
199
|
+
file_missing_in_csproj.png
|
|
200
|
+
|
data/Rakefile
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
require
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# make a task for each *_spec.rb in spec/
|
|
11
|
-
FileList["spec/*_spec.rb"].each do |path|
|
|
12
|
-
ctx = File.basename(path, "*.rb").split("_").first
|
|
13
|
-
|
|
14
|
-
desc "Run the #{ctx} spec"
|
|
15
|
-
RSpec::Core::RakeTask.new(ctx) do |t|
|
|
16
|
-
t.pattern = "spec/#{ctx}_spec.rb"
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
1
|
+
require 'rubygems/tasks'
|
|
2
|
+
Gem::Tasks.new
|
|
3
|
+
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
RSpec::Core::RakeTask.new(:spec) do |c|
|
|
6
|
+
c.rspec_opts = ['--color', '--format=doc']
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
task :default => :build
|
data/albacore.gemspec
CHANGED
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
#
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
4
|
+
require 'albacore/version'
|
|
6
5
|
|
|
7
|
-
Gem::Specification.new do |
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = 'albacore'
|
|
8
|
+
s.version = Albacore::VERSION
|
|
9
|
+
s.platform = Gem::Platform::RUBY
|
|
10
|
+
s.authors = ['Henrik Feldt', 'Anthony Mastrean']
|
|
11
|
+
s.email = 'henrik@haf.se'
|
|
12
|
+
s.homepage = 'http://albacorebuild.net'
|
|
13
|
+
s.summary = 'Dolphin-safe and awesome Mono and .Net Rake-tasks'
|
|
14
|
+
s.description = <<-EOF
|
|
15
|
+
Easily build your .Net or Mono project using this collection of Rake tasks.
|
|
16
|
+
Albacore assist you in creating nugets, managing nugets, building your projects,
|
|
17
|
+
handling the .Net compilers while making it very easy to integrate your ruby-code
|
|
18
|
+
with existing dev-ops tools, such as Puppet, Chef, Capistrano or Vagrant/VirtualBox.
|
|
19
|
+
EOF
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
19
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
|
-
spec.require_paths = ["lib"]
|
|
21
|
+
s.rubyforge_project = 'albacore'
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
s.add_dependency 'rake', '>10' # this gem builds on rake
|
|
24
|
+
s.add_dependency 'map', '~>6.5' # https://github.com/ahoward/map for options handling
|
|
25
|
+
s.add_dependency 'nokogiri', '~> 1.5' # used to manipulate and read *proj files
|
|
26
|
+
s.add_dependency 'facter', '~> 1.7' # used to gather system data
|
|
27
|
+
s.add_dependency 'semver2', '~> 3.3'
|
|
28
|
+
s.add_dependency 'ProcessPilot', '~> 2.0'
|
|
29
|
+
s.add_dependency 'highline', '~> 1.6'
|
|
30
|
+
s.add_dependency 'rubyzip', '=0.9.9'
|
|
31
|
+
|
|
32
|
+
s.add_development_dependency 'rubygems-tasks', '~>0.2'
|
|
33
|
+
s.add_development_dependency 'rspec', '>= 2.13'
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
s.files = `git ls-files`.split("\n")
|
|
36
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
|
37
|
+
# s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
38
|
+
s.require_paths = ['lib']
|
|
29
39
|
end
|