podspecpush 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9530bf344c87ce1a4f88c578b888e28847f5166
4
- data.tar.gz: 28d81f981e81c4fe7bd511f0fdaf9e5d5bf12696
3
+ metadata.gz: b01b18270358735f8328808221b22d32a2b4eee8
4
+ data.tar.gz: eaf525a969c2be61ad6f5c324365c38100152cb4
5
5
  SHA512:
6
- metadata.gz: a40023bda6d65da07f3062e4f3387a253d7f90633844b5d489515025e4e3923bfa285ef4c3fc070f62e6f563e82c046d219626af0ec9498d9238ccc23b5191f4
7
- data.tar.gz: 78b81ef7bed25a3aaa43cdafdd169d354e33b14e523948593116cfaf655adde31996c9586a1e71465e2112fb0e12e9f6db34f5c8ec64205969dd86d42dba51fc
6
+ metadata.gz: 16d4b7ff81aab31d637276fc57758f61b25130b5ceb3171985537a240a51698f6565232dac0fa1ba4bb0f65b725254703070f5bec0f90b905a82448d5472290e
7
+ data.tar.gz: 394a99996926cef1caf011abd59a4c264325fd1641bc63afcc93cd185d1861b1be940ec8d8fa861a3b06d6dd52097ea5dc00dcaef99e8a7587401b8c77ca909f
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Podspecpush
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/podspecpush`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Tired of linting, checking, pushing your cocoapod spec? No more! Once you are satisified with your pod, simply increment and push the tag. No changes to .podspec required, the tooling will update this for you!
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ You can then publish your next version by running `podspecpush --repo <reponame>`!
6
+
7
+ Thats it!
6
8
 
7
9
  ## Installation
8
10
 
@@ -22,7 +24,13 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
25
- TODO: Write usage instructions here
27
+ To push a spec repo
28
+
29
+ ```ruby
30
+ podspecpush --repo myPersonalRepo --force true
31
+ ```
32
+
33
+ Note: The force flag is off by default. If set to true you will push with warnings.
26
34
 
27
35
  ## Development
28
36
 
@@ -32,7 +40,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
40
 
33
41
  ## Contributing
34
42
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/podspecpush.
43
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jcarroll-mediafly/podspecpush.
36
44
 
37
45
 
38
46
  ## License
@@ -1,3 +1,3 @@
1
1
  module Podspecpush
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/podspecpush.rb CHANGED
@@ -48,8 +48,22 @@ module Podspecpush
48
48
  lint = system(lintCmd)
49
49
 
50
50
  if lint == false
51
- puts "Linting failed, see errors. If its just a warning run with --force argument"
52
- exit
51
+ puts "Linting failed, try again by allowing warnings? [Y/n]"
52
+ decision = gets.chomp.downcase
53
+ if decision == "y"
54
+ tryAgainCmd = "pod spec lint #{podspecName} --allow-warnings"
55
+ tryAgain = system(tryAgainCmd)
56
+
57
+ if tryAgain == false
58
+ puts "Even with warnings, something is wrong. Look for any errors"
59
+ exit
60
+ else
61
+ puts "Proceeding by allowing warnings"
62
+ force = true
63
+ end
64
+ else
65
+ exit
66
+ end
53
67
  end
54
68
 
55
69
  pushCmd = "pod repo push #{repoName} #{podspecName}" + (force == true ? ' --allow-warnings' : '')
@@ -63,21 +77,21 @@ module Podspecpush
63
77
  addExecute = system('git add .')
64
78
 
65
79
  if addExecute == false
66
- puts "Could not add files, consider finishing by hand and not the script"
80
+ puts "Could not add files to git, consider finishing by hand by performing a git add, commit, and push. Your spec repo should be up to date"
67
81
  exit
68
82
  end
69
83
 
70
84
  commitExecute = system('git commit -m "[Versioning] Updating podspec"')
71
85
 
72
86
  if commitExecute == false
73
- puts "Could not commit files, consider finishing by hand and not the script"
87
+ puts "Could not commit files, consider finishing by hand by performing a git commit and push. Your spec repo should be up to date"
74
88
  exit
75
89
  end
76
90
 
77
91
  pushToServer = system('git push origin master')
78
92
 
79
93
  if pushToServer == false
80
- puts "Could not push to server, consider finishing by hand and not the script"
94
+ puts "Could not push to server, consider finishing by hand by performing a git push. Your spec repo should be up to date"
81
95
  exit
82
96
  end
83
97
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podspecpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Carroll
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-19 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop