pod-pipeline 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: 675d0ddaa029cc0b8945f68529698c99774c5345b60da818ea827d18134d5972
4
- data.tar.gz: 0a9afea692777250dceaa4e2f13facb714a91641699c662f3023568368d347be
3
+ metadata.gz: 5860ce308879a433f573795aa43dbeb1d9a82f95aaf5cf7b9989835cd1d7f7c2
4
+ data.tar.gz: 500b65c92ce14bb91ff17fab25bbd8a972478d66f7b649ff4bda275a03b5cb7b
5
5
  SHA512:
6
- metadata.gz: df852956c2047496a99e5c5d081ce42eaa3fc83b0492a5199a6fd6f75c1cd393273a3987a2a194860deba484ccdc9d34a1acf9f00dbf1bcf27b4716835ad463f
7
- data.tar.gz: 4bdb21e4ca1eb50a57c2b2ddfd7941d2f16966699d3ab6b152fdee910a431df47d91430b33f8a8b905c5f0f953f12aa92fc6320e14975d56ba0941619899e429
6
+ metadata.gz: 6a4256bd76d6c94eb67d5264e6a9a5ffd178af877e0c97dbad458805fe48c9c5ffba5cedd093fa6677e970f29d48ce1d82c17668210610c0c879691897dc3165
7
+ data.tar.gz: 131bee767504b3a169ed7b3709a514e13f297ea4059fd63efa8d1f9a908479cc4474376bcd0e6fef694d39ba39b33ce63819dcf0424fe81258e1ffef993b36f8
@@ -2,6 +2,7 @@ require 'claide'
2
2
 
3
3
  module PPL
4
4
  class Command < CLAide::Command
5
+ require 'pod-pipeline/command/new'
5
6
  require 'pod-pipeline/command/scan'
6
7
  require 'pod-pipeline/command/build'
7
8
  require 'pod-pipeline/command/update'
@@ -0,0 +1,43 @@
1
+ require 'cocoapods'
2
+
3
+ module PPL
4
+ class Command
5
+ class New < Command
6
+ self.summary = '创建新项目'
7
+
8
+ self.description = <<-DESC
9
+ 根据TokiHunter的最佳实践,为名为 'NAME' 的新Pod库的开发创建一个脚手架。
10
+ 如果未指定 '--lib-create-template-url',默认使用 'https://github.com/TokiPods/pod-template.git'。
11
+ DESC
12
+
13
+ self.arguments = [
14
+ CLAide::Argument.new('项目名字', true),
15
+ ]
16
+
17
+ def self.options
18
+ [].concat(super).concat(options_extension)
19
+ end
20
+
21
+ def self.options_extension_hash
22
+ Hash[
23
+ 'lib-create' => Pod::Command::Lib::Create.options,
24
+ ]
25
+ end
26
+
27
+ def initialize(argv)
28
+ @name = argv.shift_argument
29
+
30
+ super
31
+ end
32
+
33
+ def run
34
+ const_name = 'TEMPLATE_REPO'
35
+ if Pod::Command::Lib::Create.const_defined?(const_name)
36
+ Pod::Command::Lib::Create.send(:remove_const, const_name)
37
+ Pod::Command::Lib::Create.const_set(const_name, 'https://github.com/TokiPods/pod-template.git'.freeze)
38
+ end
39
+ Pod::Command::Lib::Create.run([@name] + argv_extension['lib-create'])
40
+ end
41
+ end
42
+ end
43
+ end
@@ -57,9 +57,11 @@ module PPL
57
57
  podspec_file = PPL::Scanner.linter.file
58
58
 
59
59
  if @is_master
60
+ puts "[发布 #{podspec_file}]"
60
61
  push_argv = [podspec_file] + argv_extension['trunk-push']
61
62
  Pod::Command::Trunk::Push.run(push_argv)
62
63
  else
64
+ puts "[发布 #{@repo} #{podspec_file}]"
63
65
  push_argv = [@repo, podspec_file] + argv_extension['repo-push']
64
66
  Pod::Command::Repo::Push.run(push_argv)
65
67
  end
@@ -12,7 +12,7 @@ require 'pod-pipeline/extension/validator-ppl'
12
12
  module PPL
13
13
  class Command
14
14
  class Update < Command
15
- self.summary = '项目扫描'
15
+ self.summary = '项目更新'
16
16
  self.description = <<-DESC
17
17
  更新项目内容
18
18
  DESC
@@ -21,7 +21,7 @@ module PPL
21
21
  ]
22
22
  def self.options
23
23
  [
24
- ['--channel=version,git', '更新内容。(默认更新所有内容)'],
24
+ ['--channel=version,git', '更新内容,version为更新podspec文件中的的版本号,git为Git仓库添加对应podspec版本号的tag,并上传到远端。(默认更新所有内容)'],
25
25
  ['--version=x.x.x', '新版本号。(默认使用patch+1)']
26
26
  ].concat(super)
27
27
  end
@@ -84,6 +84,8 @@ module PPL
84
84
  git.add('.')
85
85
  git.commit_all(new_tag)
86
86
  git.add_tag(new_tag)
87
+
88
+ puts "[Git 上传 #{git.remote} #{git.branches.current.first} #{new_tag}]"
87
89
  git.push(git.remote, git.branches.current.first, true)
88
90
  end
89
91
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - 郑贤达
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-18 00:00:00.000000000 Z
11
+ date: 2021-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -115,6 +115,7 @@ files:
115
115
  - lib/pod-pipeline.rb
116
116
  - lib/pod-pipeline/command.rb
117
117
  - lib/pod-pipeline/command/build.rb
118
+ - lib/pod-pipeline/command/new.rb
118
119
  - lib/pod-pipeline/command/publish.rb
119
120
  - lib/pod-pipeline/command/scan.rb
120
121
  - lib/pod-pipeline/command/update.rb