azbuild 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +102 -79
- data/azbuild.gemspec +2 -2
- data/lib/azbuild.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fd57c88f88c2f213a1c0ee5baf69cb2f6abe05d
|
4
|
+
data.tar.gz: 8a33dcbafff2284ea11860966b524686f9e8054a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
10
|
+
**How to use _azbuild_ gem**
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
task :
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
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.
|
4
|
-
s.date = '2016-08
|
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.
|
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
|
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
|