tworingtools 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/prerelease-podspec +13 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d5ba068c26f5404bb471ff620f0319663a18844d650f6d940a0820bfe9c1e5a
4
- data.tar.gz: 5b99e3580f0c348d4a988a68b21e851d3730daca051830e24a7029dc67434851
3
+ metadata.gz: f148163f729f26925e2bf9f8e1af2df7481069fa0a465e78e46a88bef71cce5e
4
+ data.tar.gz: b7035c0068f523eefb50fd8de3ca529aefa5655193f5d6f547e169efa7e22196
5
5
  SHA512:
6
- metadata.gz: eb6513944b8be8052f394659bf64eb277e678c4ce083c9b105a2ef1b796119db6d68b6e1b8379ab9cf22d79e2a9ffd71241a775f812b5282e98cb01a01759633
7
- data.tar.gz: 532052a792f881fe971d21f0ff617345e302d6852586081f92964bf050c9ae9ff168e61ed5f8268ed85668c6ca5636d2fb70d63ded231d5f0252d807a18169c1
6
+ metadata.gz: 7fd004a9c0c81b2bd858647f806f6f978e47670283aed074a1fc15280dfcd904e28bafe0f7c60b809453990737fd35287760d1d75d154f827d35fa6e4135ebfc
7
+ data.tar.gz: 61bb02fbcde991cc829af25754495131a9541b569c5218edaf46a32c446f30f28b6dd21f685a953e87dfdb3e30e1b619e15e4e0c343c88a47446c8471efe0e83
@@ -22,6 +22,7 @@ parser = OptionParser.new do |opts|
22
22
  BANNER
23
23
  opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
24
24
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
25
+ opts.on('-n', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
25
26
  opts.on('-h', '--help', 'Print this help message.') do
26
27
  puts opts
27
28
  exit
@@ -35,13 +36,20 @@ current_version = `vrsn --read --file #{version_file}`.strip
35
36
  branch = "#{podspec}-#{current_version}-release"
36
37
  echo_and_exec "git checkout -b #{branch}"
37
38
 
38
- tag_root = "#{podspec}-#{current_version}-RC"
39
- release_candidate_number = `git tag --list | grep #{tag_root} | wc -l`.strip.to_i + 1
40
- release_candidate_tag = "#{tag_root}#{release_candidate_number}"
41
- echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{current_version}-RC#{release_candidate_number}\"\\'/g\" #{version_file}"
39
+ version_root = "#{current_version}-RC"
40
+ release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
41
+
42
+ tag_value = String.new
43
+ if options[:podspec_name_in_tag] then
44
+ tag_value = "#{podspec}-#{version_root}#{release_candidate_number}"
45
+ else
46
+ tag_value = "#{version_root}#{release_candidate_number}"
47
+ end
48
+
49
+ echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{tag_value}\"\\'/g\" #{version_file}"
42
50
  echo_and_exec "git add #{version_file}"
43
51
  echo_and_exec "git commit --message 'TEMP: set podspec version to release candidate version'"
44
- echo_and_exec "git tag #{release_candidate_tag}"
52
+ echo_and_exec "git tag #{tag_value}"
45
53
  echo_and_exec 'git push --tags'
46
54
 
47
55
  puts "About to lint the podspec. This takes a while... (it is now #{Time.now})"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tworingtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api