azdeploy 1.0.5 → 1.0.6

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: d5e3771e82e654723dfdc840a58e873ade5c2bda
4
- data.tar.gz: fe53c029d6632d4406a22045fc53a648e663ed23
3
+ metadata.gz: d641edc2351de9de6a089360ef798010373e52b2
4
+ data.tar.gz: 2b9ee156665ba236991c40581d50e364cff33024
5
5
  SHA512:
6
- metadata.gz: 017ff1c4cea06f4a8d2f95fa6e0d7c865c06bae16641f97b1511725b4a8cb5b7881557e09dadb181a7a662a004bcab7c4ce16502401241f2d22e21e3201b079a
7
- data.tar.gz: 4219906d1a9d11224dc33a901fd0448705f16ce112b407e344de2c6c295166d5d6fbd511e865b26244a1103b4f50480543511c617a3ae516c98a5839a7bc0ad7
6
+ metadata.gz: 6580073fb6c9f20a4d0bb4e9049ae994c6c8783a116f00e5e24010a82038d0eb660ce1cafc5dfc3a2eedfbd3c2fffe7e94d5b410f4abe0c763e0c5e5023b0253
7
+ data.tar.gz: 6ccc1b58472170531304c354453dfbc6a0da25d92a450df09a4ad02552da5867d136d1991972f9cdb833d50591d8de281307178ae13fb3df91749acdd2eb59c6
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'azdeploy'
3
- s.version = '1.0.5'
3
+ s.version = '1.0.6'
4
4
  s.date = '2015-02-04'
5
5
  s.summary = 'Setup and scripting support for .Net project builds'
6
6
  s.description = 'Azure Deployment Gem. Provides easy setup and deployment scripting support for .Net project builds'
@@ -60,14 +60,17 @@ end
60
60
 
61
61
  def cleantask(props)
62
62
 
63
- FileUtils.rm_rf props[:output]
64
- waitfor { !exists?(props[:output]) }
65
-
66
- FileUtils.rm_rf props[:artifacts]
67
- waitfor { !exists?(props[:artifacts]) }
63
+ if props.has_key?(:output) && File.directory?(props[:output])
64
+ FileUtils.rm_rf props[:output]
65
+ waitfor { !exists?(props[:output]) }
66
+ Dir.mkdir props[:output]
67
+ end
68
68
 
69
- Dir.mkdir props[:output]
70
- Dir.mkdir props[:artifacts]
69
+ if props.has_key?(:artifacts) && File.directory?(props[:artifacts])
70
+ FileUtils.rm_rf props[:artifacts]
71
+ waitfor { !exists?(props[:artifacts]) }
72
+ Dir.mkdir props[:artifacts]
73
+ end
71
74
 
72
75
  end
73
76
 
@@ -150,9 +153,9 @@ def check_package_version_dependency(package_uri, package)
150
153
  # for each file match version. Return false is check fails
151
154
  config_files.each{ |file|
152
155
  doc = Nokogiri::XML(File.read(file))
153
- node = doc.xpath("//*[@id=\"#{package}\"]")
156
+ node = doc.at_xpath("//*[@id=\"#{package}\"]")
154
157
  if (!node.nil?)
155
- config_version = node.attr('version').value
158
+ config_version = node.attr('version')
156
159
  puts "Package: #{package} Latest Version: #{version} File: #{file} File package version: #{config_version}"
157
160
  return false unless config_version.to_s == version
158
161
  end
@@ -80,7 +80,7 @@ def check_ruby
80
80
  localVersion = "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
81
81
  expectedVersion1 = '1.9.3-p551'
82
82
  expectedVersion2 = '2.0.0-p481'
83
- if (!rubyVersion.nil? && localVersion != expectedVersion1 && localVersion != expectedVersion2)
83
+ if (!rubyVersion.nil? && (localVersion != expectedVersion1 || localVersion != expectedVersion2))
84
84
  puts "Uninstall incompatible version of ruby: #{localVersion} and install version: #{expectedVersion1} or #{expectedVersion2}. Then Restart rake. Goto http://rubyinstaller.org/downloads/"
85
85
  return false
86
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suresh Batta