tworingtools 1.11.0 → 1.12.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 +21 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a354ee91656ac14cc04b335f792b693f28fe52c34280b45ca6688fefad86817c
4
- data.tar.gz: ecea975ce9a07a97af369f0c502aed6838fcd207f83ba9249fd385fa94a1834c
3
+ metadata.gz: 96d48d8821806f99ee56aff430dba969b47b0e26744f023eec74831d365be3cc
4
+ data.tar.gz: dc806e91396045bc9bfaf34f4dc27d0738d7f3158cf778221f6f26c026ff817e
5
5
  SHA512:
6
- metadata.gz: 91ce5a4d6db4bb5d2222dced0e437a01fbff9a102510617eff7f870444f30917f4ad11e2e10929c8a401cae3381a9e00884620d031bb433fcb5909595da2e735
7
- data.tar.gz: 4cf2584b4c9380840e7a1248907f6ebd40ac0dc084be59246e24b796230f9de1203473f5e08fa4ea984b929da41ca9e017659cc1954d17e4be8c96877fb7dbc8
6
+ metadata.gz: ec3cd00c985131dd24196c13ef113a6238f81c98c2ceee19b7592c79b0d731881603134be2884202eae93ee814115afa9ce9be71232c265c9ab75db387c89d33
7
+ data.tar.gz: 75150c44d5dcd82e5688be52876974ac44eead4b22c27e4bc696114683d43a2d597406fa4ef23662d94059765c2d19263df7bcd4469f8703534f5054cdcbf2b4
@@ -23,7 +23,9 @@ parser = OptionParser.new do |opts|
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
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
26
- opts.on('-h', '--help', 'Print this help message.') do
26
+ opts.on('-n', '--no-branch', 'Make any changes on the current branch instead of creating a temporary new branch.') do |no_branch| options[:no_branch] = true end
27
+ opts.on('-cCHANGELOG', '--changelog=CHANGELOG', 'Location of a CHANGELOG document adhering to https://keepachangelog.com/en/1.0.0/ whose version entry should be extracted into an annotated tag for this release candidate.') do |changelog| options[:changelog] = changelog end
28
+ opts.on('-h', '--help', 'Print this help message.') do
27
29
  puts opts
28
30
  exit
29
31
  end
@@ -33,8 +35,10 @@ parser.parse!
33
35
  version_file = "#{podspec}.podspec"
34
36
 
35
37
  current_version = `vrsn --read --file #{version_file}`.strip
36
- branch = "#{podspec}-#{current_version}-release"
37
- echo_and_exec "git checkout -b #{branch}"
38
+ unless options[:no_branch] then
39
+ branch = "#{podspec}-#{current_version}-release"
40
+ echo_and_exec "git checkout -b #{branch}"
41
+ end
38
42
 
39
43
  version_root = "#{current_version}-RC"
40
44
  release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
@@ -49,12 +53,19 @@ end
49
53
 
50
54
  echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{release_candidate_version}\"\\'/g\" #{version_file}"
51
55
  echo_and_exec "git add #{version_file}"
52
- echo_and_exec "git commit --message 'TEMP: set podspec version to release candidate version'"
53
- echo_and_exec "git tag #{tag_value}"
56
+ echo_and_exec "git commit --message 'chore(#{podspec}): set to release candidate version'"
57
+
58
+ if options[:changelog] then
59
+ echo_and_exec 'git config core.commentchar @'
60
+ echo_and_exec "rbenv exec bundle exec changetag --name #{current_version} #{options[:changelog]} #{tag_value}"
61
+ echo_and_exec 'git config core.commentchar #'
62
+ else
63
+ echo_and_exec "git tag #{tag_value}"
64
+ end
54
65
  echo_and_exec 'git push --tags'
55
66
 
56
67
  puts "About to lint the podspec. This takes a while... (it is now #{Time.now})"
57
- spec_lint_flags = Array.new
68
+ spec_lint_flags = Array.new
58
69
  if options[:allow_warnings] != nil then
59
70
  spec_lint_flags << '--allow-warnings'
60
71
  end
@@ -65,8 +76,10 @@ stdout, stderr, status = Open3.capture3 "rbenv exec bundle exec pod spec lint #{
65
76
 
66
77
  puts "stdout: #{stdout}"
67
78
 
68
- echo_and_exec 'git checkout master'
69
- echo_and_exec "git branch -D #{branch}"
79
+ unless options[:no_branch] then
80
+ echo_and_exec 'git checkout master'
81
+ echo_and_exec "git branch -D #{branch}"
82
+ end
70
83
 
71
84
  if status != 0 then
72
85
  puts "Podspec failed validation:\nstderr: #{stderr}"
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.11.0
4
+ version: 1.12.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: 2020-03-15 00:00:00.000000000 Z
11
+ date: 2020-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api