azbuild 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +102 -79
  3. data/azbuild.gemspec +2 -2
  4. data/lib/azbuild.rb +6 -6
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 912af354939208cdcaa18b47b7b566da75ac0107
4
- data.tar.gz: e455f03afb79053387f59ca0522908aac607f4e2
3
+ metadata.gz: 3fd57c88f88c2f213a1c0ee5baf69cb2f6abe05d
4
+ data.tar.gz: 8a33dcbafff2284ea11860966b524686f9e8054a
5
5
  SHA512:
6
- metadata.gz: a02e03e702ddbcae033201c29545fafe13728a77ce5c17de2363a8fe1c2f8b9114aeedaca37dc90bbd730ddaa1e0a6a70d5a51f0bbdc403fa7474ad9c8813ac5
7
- data.tar.gz: 818145206931035c8176708d3f43fd65a6b2c58e5f8031ddd2f1cdc72d5154ac1654642626cbf4745e3daff5e90148f76d9e53c9b03dfc5c02d2329f7255ca68
6
+ metadata.gz: 55792da5299e687af260a0d58c86e77685bcb42f1b6107f545e86dc6ea98f7e2341941b9c689b17229df187d4f5a95e678d77b869f87dff6d6a32c89b3ba52f3
7
+ data.tar.gz: 08fcf707f299534ba92a78ef643634d5b4b96171aa6527a734efd463bb595a1ee9b6d013d5692e7bb26c7a66a4862cca63de574996cb7e008a34f3b5798c7bed
data/README.md CHANGED
@@ -5,89 +5,112 @@ azbuild
5
5
 
6
6
  The gem also simplifies ruby version and gem dependencies by bootstrapping itself to detect and install right gem versions. This may soon chnage to use bundler in future.
7
7
 
8
- <b>Note: </b>azbuild is the next evolution of <b>azdeploy</b> gem that is available on http://rubygems.org
8
+ **Note:** _azbuild_ is the next evolution of _azdeploy_ gem that is available on [rubygems](http://rubygems.org). This gem has been written for .net solutions that need Microsoft Azure service deployments and has support for configuration transforms.
9
9
 
10
- <b>Where do configuration values come from?</b>
10
+ **How to use _azbuild_ gem**
11
11
 
12
- Currently, configuration key value pairs for specific transforms are stored and retrived from an Azure Table using azure ruby gem. More transforms can be added as well as other configuration sources
13
-
14
- <b>How to use the gem</b>
15
-
16
- azbuild is in development and you'll need to use azdeploy until azbuild development is complete.
17
-
18
- To start using azdeploy,
19
-
20
- 1. install Ruby version 2.0.0p481
21
- 2. install azdeploy from http://rubygems.org
22
- 3. require the azdeploy gem in a blank rake script
23
- 4. run rake script
12
+ 1. install Ruby version 2.3.1-p112 from [RubyInstaller Site](http://rubyinstaller.org)
13
+ 2. Add gem source (unsecured): `gem sources -a http://rubygems.org`
14
+ 3. install azbuild - `gem install azbuild`
15
+ 4. require the azdeploy gem in a blank rake script
16
+ 5. run rake script
24
17
 
25
18
  Running the rake script from above will kick-off the install sequence and install all requisite gems. Follow prompts and take appropriate actions like restarting console.
26
19
 
27
20
  A typical build would perform the following steps:
28
21
 
29
- 1. clean solution build output folders
30
- 2. transform configuration
31
- 3. restore nuget packages
32
- 4. build the solution
33
- 5. run unit tests
34
- 6. copy build output to specified folders
35
- 7. create nuget packages as specified and copy to artifacts folders
36
- 8. run publish where required (web projects)
37
-
38
- Few examples of tasks and their usage is as follows:
39
-
40
- ```
41
- desc 'Prepares the working directory for a new build'
42
- task :clean do
43
- cleantask(BUILD_PATHS)
44
- end
45
-
46
- desc 'Transform Configuration'
47
- task :transform_config do
48
- Transform.new.transform([''])
49
- end
50
-
51
- desc 'restores missing packages'
52
- task :restore do
53
- restore_nuget(NUGET) # path of nuget exe
54
- end
55
-
56
- desc 'Only compiles the application.'
57
- msbuild :build do |msb|
58
- msb.targets :Clean, :Build
59
- clean_build(msb, "src/#{PRODUCT}.sln")
60
- end
61
-
62
- desc "Publishes."
63
- msbuild :publish do |msb|
64
- msb.targets :Publish
65
- clean_build(msb, "src/#{PRODUCT}.sln")
66
- end
67
-
68
- desc 'Running rake for each sub project'
69
- task :package do
70
-
71
- end
72
-
73
- desc 'Copies build output to designated folders.'
74
- task :copy_output do
75
- outputs.each { |name, filter|
76
- copy_output_files File.join(BUILD_PATHS[:src], name), filter, File.join(BUILD_PATHS[:output], 'net-4.5')
77
- }
78
- end
79
-
80
- desc 'Cleans, versions, compiles the application and generates build_output.'
81
- task :compile => [:build, :tests, :copy_output]
82
-
83
- desc '**Default**, compiles and runs tests'
84
- task :default => [:clean, :transform_config, :restore, :compile, :package, :publish]
85
-
86
- ```
87
-
88
- Instructions for azbuild when it's ready:
89
-
90
- 1. Install latest version of Ruby
91
- 2. Install the gem from http://rubygems.org
92
- 3. Run bundle update
93
- 4. require gem in a rake script and start using available methods
22
+ ![](https://github.com/subatta/azbuild/images/build_steps.png)
23
+
24
+ 1. Clean solution build output folders
25
+ 2. Restore nuget packages
26
+ 3. Version project/s in solution
27
+ 4. Build
28
+ 5. Run automated tests
29
+ 6. Copy build output to specified folders
30
+ 7. Create nuget packages as specified and copy to artifacts folders
31
+ 8. Run publish where required (web projects)
32
+
33
+ An example of tasks and their usage is as follows:
34
+
35
+ require 'azbuild'
36
+
37
+ COMPANY = 'A Company'
38
+ COPYRIGHT = 'Copyright 2016 ' + COMPANY
39
+ PRODUCT = COMPANY + '.AProduct'
40
+ PRODUCT_DESCRIPTION = PRODUCT + ' Library'
41
+ PROJECT_URL = ""
42
+
43
+ BUILD_CONFIG = 'Release'
44
+ OUTPUT_PATH = 'bin/' + BUILD_CONFIG
45
+ PACKAGES = 'packages'
46
+
47
+ build_paths = {
48
+ :src => File.expand_path('.'),
49
+ :output => File.expand_path('build_output'),
50
+ :artifacts => File.expand_path('build_artifacts')
51
+ }
52
+
53
+ outputs = {
54
+ "#{PRODUCT}/#{OUTPUT_PATH}" => "#{PRODUCT}.{dll,pdb,xml}",
55
+ }
56
+
57
+ nugets = {
58
+ 'ALibrary' => {
59
+ :projects => FileList["*/#{PRODUCT}.csproj"],
60
+ :files => {
61
+ 'build' => FileList[File.join(Dir.pwd, 'Lib/*')] + [File.join(Dir.pwd, 'ALibrary.targets')]
62
+ },
63
+ :version => read_versions['ALibrary'][:nuget_version]
64
+ }
65
+ }
66
+
67
+ task :clean do |t|
68
+ puts "Cleaning and creating working directories...".bg_green.white
69
+ cleantask(build_paths)
70
+ end
71
+
72
+ nugets_restore :restore do |n|
73
+ puts "Restoring missing nuget packages...".bg_green.white
74
+ n.nuget_gem_exe
75
+ n.out = File.expand_path(PACKAGES)
76
+ end
77
+
78
+ task :versioning do |t|
79
+ puts "Versioning assemblies...".bg_green.white
80
+ update_assembly_versions
81
+ end
82
+
83
+ build :build do |b|
84
+ puts "Performing build...".bg_green.white
85
+
86
+ b.logging = 'q' # q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
87
+ b.target = ['Clean', 'Rebuild']
88
+ b.prop 'Configuration', BUILD_CONFIG
89
+ b.sln = 'Fingerprint.sln'
90
+ b.nologo # no Microsoft/XBuild header output
91
+ end
92
+
93
+ task :tests do |tests|
94
+ puts "Running the Units Tests for Library...".bg_green.white
95
+ run_vsconsole_tests 'Fingerprint', ['/TestCaseFilter:TestCategory!=Integration']
96
+ end
97
+
98
+ task :copy_output do
99
+ puts "Copying build output to designated folders...".bg_green.white
100
+ outputs.each { |name, filter|
101
+ copy_output_files File.join(build_paths[:src], name), filter, File.join(build_paths[:output], 'net-4.6')
102
+ }
103
+ end
104
+
105
+ task :create_nugets do
106
+ puts "Creating the nuget packages and copying them to artifacts...".bg_green.white
107
+ nugets.each { |id, config|
108
+ nuget_pack id, config, build_paths[:artifacts]
109
+ }
110
+ end
111
+
112
+ desc 'Cleans, versions, compiles the application and generates build_output.'
113
+ task :compile => [:versioning, :build, :tests, :copy_output, :create_nugets]
114
+
115
+ desc 'Run all build tasks'
116
+ task :default => [:clean, :restore, :compile]
data/azbuild.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'azbuild'
3
- s.version = '1.0.0'
4
- s.date = '2016-08-14'
3
+ s.version = '1.0.1'
4
+ s.date = '2016-11-08'
5
5
  s.summary = 'Setup and scripting support for .Net project builds'
6
6
  s.description = 'Build, Configuration and Deployment Gem for .Net Solutions'
7
7
  s.authors = ['Suresh Batta']
data/lib/azbuild.rb CHANGED
@@ -6,13 +6,13 @@ require_relative 'package.rb'
6
6
  require_relative 'semver_extensions'
7
7
 
8
8
  # installation
9
- installers = [
10
- 'ruby', 'gems'
11
- ]
9
+ #installers = [
10
+ # 'ruby', 'gems'
11
+ #]
12
12
 
13
- installers.each { |method|
14
- exit if !send("check_#{method}")
15
- }
13
+ #installers.each { |method|
14
+ # exit if !send("check_#{method}")
15
+ #}
16
16
 
17
17
  #require 'rubygems'
18
18
  require 'nokogiri'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suresh Batta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-14 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Build, Configuration and Deployment Gem for .Net Solutions
14
14
  email: subatta@hotmail.com