pod_updater 0.5.1 → 0.5.2

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: 55530e7a1ad25e3d8147b3175745f34708c4f12a
4
- data.tar.gz: 98d4465dcd9d7b72d49a202f4441a0bf73c6f9de
3
+ metadata.gz: 2cbece51a322c3f8e7156fc603a84e3cd5da130c
4
+ data.tar.gz: d2637f413f52c557c79cd1a40977f972729ccc7d
5
5
  SHA512:
6
- metadata.gz: eec76d0b61f861f6d0c9217815c639e66877b70bbc9925756c1ea11399766ac3a59e1000441217cca85be73950fd2352eb5c0088c0fa515ee64a5a8d69eef7b8
7
- data.tar.gz: 361d2e5f595a8f6572c3d81cad6e7bd39667b9ed11e118dc5f88a9168920301d302176cbdb8645bac1132d211ec72360cd06f8351a5c6e7557e2533ac6972bcb
6
+ metadata.gz: b11ad00c98d40f4815ee516f5e2eae8fa25efc03194feeebeba04d6727bd21a63b134408def07ab63a4249bfe2dd2d75e5ec60240bb348acdd8b6338ca4f910e
7
+ data.tar.gz: d189194f1f7f8e64df16689f44376b9ac0dc10456fad4446d62f7dcf9bc59796217e18402003b6ea3292a525eeefb0ca92229fc661d724eacd31b302e1fb554d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pod_updater (0.4.2)
4
+ pod_updater (0.5.1)
5
5
  colorize
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -4,40 +4,31 @@
4
4
 
5
5
  # PodUpdater
6
6
 
7
- iOS开发中帮助您快速的将自己的开发的pod库代码上传到git,并帮你push到podspec repo库去
8
- 使用方式:cd到你的pod库代码目录,然后执行'pod_updater -v [new_version]',然后就可以去喝杯茶了
7
+ iOS 开发中帮助您快速的将自己的开发的pod库代码上传到 git ,并帮你 push podspec repo 库去
8
+ 使用方式: cd 到你的 pod 库代码目录,然后执行'pod_updater -v [new_version]',然后就可以去喝杯茶了
9
9
 
10
- ## Installation
10
+ ## 如何安装
11
11
 
12
- Add this line to your application's Gemfile:
13
-
14
- ```ruby
15
- gem 'pod_updater'
16
- ```
17
-
18
- And then execute:
19
-
20
- $ bundle
21
-
22
- Or install it yourself as:
12
+ shell 输入下面命令
23
13
 
24
14
  $ gem install pod_updater
25
15
 
26
- ## Usage
16
+ ## 使用
27
17
 
28
- cd to the path where your podspec project.
18
+ cd 到你的 podspec 所在的目录路径,如:
29
19
 
30
20
  ```
31
- cd ~/Desktop/my_private_pod/my_first_pod
21
+
22
+ cd ~/Desktop/my_private_pod/my_first_pod
32
23
 
33
24
  ```
34
- then , run 'pod_updater -v 1.0.1'
25
+ 然后输入下面命令:
35
26
 
36
27
  ```
37
- pod_updater -v 1.0.1
28
+ pod_updater -v 1.0.1
38
29
  ```
39
30
 
40
- There are some shell commands in my shell.
31
+ 下面是一些我在使用时,shell里输入的命令
41
32
 
42
33
  ```
43
34
  qwkdeMacBook-Pro-2:~ qwk$ cd ~/Documents/WZ_GitHub/WZ_HelloKit
@@ -46,23 +37,29 @@ qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0
46
37
 
47
38
  ```
48
39
 
40
+ ## 更新记录
41
+ 1. 添加 '-c' 命令,如果你需要将新版本对应的podspec文件拷贝到其他目录进行备份,可以使用该命令。如:
49
42
 
50
- ## Development
51
-
52
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
-
54
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
55
-
56
- ## Contributing
57
-
58
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pod_updater. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
59
-
43
+ ```
44
+ qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0 -c 备份目录
45
+ ```
46
+
47
+ 2. 添加podUpdater 文件来指定一个或者多个备份目录。使用方式,在pod项目的当前路径新建podUpdater文件,然后文件里添加内容:
48
+
49
+ ```
50
+ "path", "备份目录路径1"
51
+ "path", "备份目录路径1"
52
+ ```
53
+ 这样在使用:
54
+
55
+ ```
56
+ qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0
57
+ ```
58
+ 命令时,会自动从当前目录读取 podUpdater 文件里的路径,并将 podspec 文件依次拷贝过去。可参考[例子](https://github.com/hwzss/WZ_HelloKit/blob/master/podUpdater)
60
59
  ## License
61
60
 
62
61
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
63
62
 
64
- ## Code of Conduct
65
63
 
66
- Everyone interacting in the PodUpdater project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pod_updater/blob/master/CODE_OF_CONDUCT.md).
67
64
 
68
65
 
data/bin/pod_updater CHANGED
@@ -9,7 +9,7 @@ require 'optparse'
9
9
  options = {}
10
10
  option_parser = OptionParser.new do |opts|
11
11
 
12
- opts.banner = 'here is help messages of the command line tool for pod_updater'
12
+ opts.banner = 'here is help messages of the command line tool for \'pod_updater\''
13
13
 
14
14
  options[:version] = nil
15
15
  opts.on('-v', '--version [version]', String, 'the podspec\'s new version') do |version|
@@ -4,7 +4,7 @@ require 'pod_updater/ui'
4
4
  module PodUpdater
5
5
 
6
6
  module_function
7
- # podspec文件拷贝到备份的文件目录
7
+ # desc:将podspec文件拷贝到备份的文件目录
8
8
  def copy_podspec(from_path, distination, pod_version)
9
9
 
10
10
  return unless distination
@@ -15,7 +15,6 @@ module PodUpdater
15
15
  cmd << 'git push --tags'
16
16
 
17
17
  UI.log_cmd(cmd)
18
- # TODO: 尝试在每次即将执行该命令时,打印出这次的命令
19
18
  IO.popen(cmd.join(" && ")) do |io|
20
19
  io.each do |line|
21
20
  UI.msg line
@@ -13,11 +13,6 @@ module PodUpdater
13
13
  UI.msg "version:#{version}的格式不对"
14
14
  return 
15
15
  end
16
-
17
- # DEBUG:这里写死了路径是为了方便调试,正式用的话需去掉
18
- # path = "/Users/qwkj/Documents/WZ_GitHub/Ruby_Learning/day_7/QW_Http.podspec"
19
- # END
20
-
21
16
  unless File.exist?path
22
17
  UI.err "路径不存在"
23
18
  return
@@ -29,8 +24,6 @@ module PodUpdater
29
24
  f.each_line do |line|
30
25
  # puts "#{line}"
31
26
  if line.to_s =~ /s\.version\s*=\s*"(\d{1,}.\d.\d|\d{1,}.\d|\d{1,})"/
32
- # puts "匹配到了"
33
- temp = $1.to_s
34
27
  line = line.sub(/\d{1,}.\d.\d|\d{1,}.\d|\d{1,}/) do |match|
35
28
  version.to_s
36
29
  end
@@ -46,7 +39,6 @@ module PodUpdater
46
39
  # 找到指定路径下的podspec文件名
47
40
  def pathWithPodspecSuffix(path)
48
41
 
49
- # path = "/Users/qwkj/Desktop/IOS_Pod_Spec_Repo/千网PodRepo/QWCrashReporter/1.0.8/"
50
42
  path = File.expand_path(path)
51
43
  return nil unless File.exist?(path)
52
44
 
@@ -11,8 +11,7 @@ module PodUpdater
11
11
 
12
12
  podFilePath = pathWithPodspecSuffix(path)
13
13
 
14
- unless podFilePath
15
-
14
+ unless podFilePath
16
15
  return # 未找到相应的podspec文件
17
16
  end
18
17
 
@@ -23,8 +23,7 @@ class PodUpdaterFile
23
23
  unless _path =~ /\/podUpdater$/
24
24
  if File.directory?(_path)
25
25
  pod_updater_paths = Dir.glob("#{_path}/podUpdater")
26
- if pod_updater_paths.length == 0
27
- # UI.err "无法找到podUpdater文件"
26
+ if pod_updater_paths.length == 0
28
27
  pod_updater_path = nil
29
28
  elsif pod_updater_paths.length == 1
30
29
  pod_updater_path = pod_updater_paths.first
@@ -1,3 +1,3 @@
1
1
  module PodUpdater
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod_updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hwzss