dev 2.0.164 → 2.0.165
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/setup.rb +16 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b20baa1f328d1f9b3f7c7a2b3c05b107f201aa95
|
4
|
+
data.tar.gz: c4198b6e942cc5a922171fe5f865fe4d24968291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93d2c396517e6150dcb552f2a4bec8af9be47dfbcf6f141c0cdfe58cf4bfd4cb536104e62a682400cf019e58f403b0f213a8c98a0ffbae11c1dd40da63b1ed93
|
7
|
+
data.tar.gz: b701426d2be8826a4e5cce186c1d6eb509ddd89a0f37dfa5fdf4e1a3115a12d55f0aadda3aedbf123c8a7c73dace1bcbbe77178ba14a1ad9cedfc72a58a479ff
|
data/lib/tasks/setup.rb
CHANGED
@@ -52,10 +52,24 @@ class Setup < Array
|
|
52
52
|
if(defined?(VERSION))
|
53
53
|
#Text.replace_in_file('HelloLibrary.nuspec',/<version>[\d.]+<\/version>/,"<version>#{VERSION}</version>")
|
54
54
|
Dir.glob('*.nuspec').each{|nuspec|
|
55
|
-
|
55
|
+
#published_version = `gem list -r #{spec.name}`.scan(/\((\d+.\d+.\d+)\)/)[0][0]
|
56
|
+
current_version=IO.read(nuspec).scan(/<version>[\d.]+<\/version>/)[0][0]
|
57
|
+
if(current_version.include?('<version>'))
|
58
|
+
target_version="<version>#{VERSION}</version>"
|
59
|
+
if(current_version != target_version)
|
60
|
+
add "<%Text.replace_in_file('#{nuspec}','#{current_version}','#{target_version}')%>"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
#add "<%Text.replace_in_file('#{nuspec}',/<version>[\d.]+<\/version>/,'<version>#{VERSION}</version>%>'"
|
56
64
|
}
|
57
65
|
Dir.glob('**/AssemblyInfo.cs').each{|assemblyInfo|
|
58
|
-
|
66
|
+
current_version=IO.read(assemblyInfo).scan(/Version\(\"[\d.]+\"\)/)[0][0]
|
67
|
+
if(current_version.include?('Version('))
|
68
|
+
target_version="Version(\"#{VERSION}\")"
|
69
|
+
if(current_version != target_version)
|
70
|
+
add "<%Text.replace_in_file('#{assemblyInfo}','#{current_version}','#{target_version}'%>"
|
71
|
+
end
|
72
|
+
end
|
59
73
|
}
|
60
74
|
end
|
61
75
|
end
|