azbuild 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcd31122ef0433d9f336363b3520e37f65dbe998
4
- data.tar.gz: db43f71b5389bce1cdfa6fa1813b4ab47995e075
3
+ metadata.gz: d78d96005c1da5d131c79d6166a8bcffe00413e6
4
+ data.tar.gz: 51aeeffe0146bb51fa2ae818dd69cddebda1e876
5
5
  SHA512:
6
- metadata.gz: b4a3bb23e54dde91438bb9595e0c6bd4fb87659565b5fadcee092693b222bae414c31ae10581235465d43747059430130a88bddac5fcececa70f0293f9c8327c
7
- data.tar.gz: 38620c4ca8039268a4c59d5dc46184ccb96a1fbeacdf38082c706dd43c08f9b17984caf0809ba39e4929749d331603816fdbfb8bfe77d81295dd17b47cd61f63
6
+ metadata.gz: dc62be0a1cb5cd3ec16dd52713a0a0a48637824d223f02c9ea7e3e4e659f0854a241ddbeeb6066cb6988e650d1d0e8a40559da4014f6b7828c492392bf923936
7
+ data.tar.gz: 961efb3f515433b899f0537bfb08255498463c3e2399bf3eae7c38ba807136fd7c323f3c731484c0780c21eb5bbbbe7b5133dc05b489e39b14cbe4b57743b1c0
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'azbuild'
3
- s.version = '1.0.2'
4
- s.date = '2016-11-08'
3
+ s.version = '1.0.3'
4
+ s.date = '2017-03-27'
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']
@@ -67,21 +67,21 @@ def cleantask props
67
67
  end
68
68
  end
69
69
 
70
- def run_vsconsole_tests settings, params = nil, assemblies = nil
70
+ def run_vsconsole_tests settings, outdir, params = nil, assemblies = nil
71
71
 
72
72
  raise 'Settings file name is required' if settings.nil?
73
73
 
74
74
  if assemblies.nil?
75
- assemblies = FileList["**/#{OUTPUT_PATH}/*.Tests.dll"]
75
+ assemblies = FileList["**/#{outdir}/**/*.Tests.dll"]
76
76
  filelist = assemblies.map { |assembly| File.join(Dir.pwd, assembly)}
77
77
  end
78
78
 
79
79
  test_runner :tests do |tests|
80
80
  tests.files = filelist
81
- tests.exe = 'C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow/VSTest.console.exe'
81
+ tests.exe = "C:/Program\ Files\ (x86)/Microsoft\ Visual\ Studio\ 14.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow/VSTest.console.exe"
82
82
  if (params != nil)
83
83
  params.each { | p |
84
- tests.add_parameter p
84
+ tests.add_parameter p
85
85
  }
86
86
  end
87
87
  tests.add_parameter '/InIsolation'
@@ -3,74 +3,62 @@ def nuget_pack id, config, artifact_path
3
3
 
4
4
  p = Albacore::NugetsPack::Config.new
5
5
 
6
- p.configuration = BUILD_CONFIG
7
-
8
- if !config.has_key? :projects || config[:projects] == ''
9
- raise 'At least one project is required to build'.red
10
- end
11
-
12
- p.files = config[:projects]
6
+ p.configuration = config[:build_config]
13
7
 
14
8
  if config.has_key? :nuspec && config[:nuspec] != ''
15
9
  p.nuspec = config[:nuspec]
10
+ else
11
+ if !config.has_key? :projects || config[:projects] == ''
12
+ raise 'At least one project is required to build'.red
13
+ else
14
+ p.files = config[:projects]
15
+ end
16
+
17
+ p.with_package do |p|
18
+ if config.has_key? :files
19
+ config[:files].each { |folder, files|
20
+ files.map!{ |x|
21
+ "#{config[:path]}/#{config[:company]}.#{x}".expand_with(['dll','pdb','xml'])
22
+ }
23
+ files = files.flatten
24
+
25
+ files.each{ |file|
26
+ p.add_file file, folder
27
+ }
28
+ }
29
+ end
30
+ end
16
31
  end
17
32
 
18
33
  p.out = artifact_path
19
34
 
20
35
  p.with_metadata do |m|
21
36
  m.id = id
22
- m.title = PRODUCT
23
- m.description = PRODUCT_DESCRIPTION
24
- m.authors = COMPANY
37
+ m.title = config[:title]
38
+ m.description = config[:description]
39
+ m.copyright = config[:copyright]
40
+ m.authors = config[:authors]
25
41
  m.version = config[:version]
26
42
  if config.has_key? :dependencies
27
43
  config[:dependencies].each { |name, version|
28
44
  m.add_dependency name, version
29
45
  }
30
46
  end
31
- end
32
-
33
- p.target = config[:target_framework]
34
- p.with_package do |p|
35
- if config.has_key? :files
36
- config[:files].each { |folder, files|
37
- files.each{ |file|
38
- p.add_file file, folder
39
- }
47
+ if config.has_key? :framework_dependencies
48
+ config[:framework_dependencies].each { |name, version|
49
+ m.add_framework_dependency name, version
40
50
  }
41
- end
51
+ end
42
52
  end
53
+
54
+ p.target = config[:target_framework]
43
55
 
44
- p.gen_symbols
56
+ #p.gen_symbols
45
57
  p.nuget_gem_exe
46
- #p.leave_nuspec
47
58
 
59
+ #p.leave_nuspec
60
+ puts 'Nuget configuration set complete. Creating nuget...'
48
61
  Albacore::NugetsPack::ProjectTask.new(p.opts).execute
49
- end
50
-
51
- def nuget_content nuget_name, path, dotnet_ver
52
-
53
- content = {}
54
-
55
- metadata = SemVerMetadata.new ".semver/#{nuget_name}.semver"
62
+ puts 'Nuget created'
56
63
 
57
- content[:files] = {}
58
- content[:files]['lib'] = metadata.files
59
-
60
- file_names = metadata.assemblies.map{ |x|
61
- "#{path}/#{x}"
62
- }
63
- assemblies = []
64
- file_names.each{ |file|
65
- assemblies.concat(file.expand_with(['dll','pdb','xml']))
66
- }
67
- content[:files]['lib'].concat assemblies
68
-
69
- content[:dependencies] = metadata.depends
70
-
71
- content[:version] = read_versions[nuget_name][:nuget_version]
72
- content[:target_framework] = dotnet_ver
73
-
74
- content
75
64
  end
76
-
@@ -15,6 +15,22 @@ def get_commit_hash_and_date
15
15
  [commit, commit_date]
16
16
  end
17
17
 
18
+ # read version info from solutioninfo.cs file
19
+ def read_solution_version
20
+ version = ''
21
+ File.open('SolutionInfo.cs', 'r').each_line do |line|
22
+ if line.include?('AssemblyVersion')
23
+ version = line[/\(.*?\)/]
24
+ break
25
+ end
26
+ end
27
+ ver = SemVer.parse version
28
+
29
+ $version_map[ASTER] = versions(ver, &method(:commit_data))
30
+
31
+ $version_map
32
+ end
33
+
18
34
  # put semver versions in a map
19
35
  def read_versions
20
36
 
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.2
4
+ version: 1.0.3
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-11-08 00:00:00.000000000 Z
11
+ date: 2017-03-27 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