gct 0.1.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 +7 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +102 -0
- data/README.md +40 -0
- data/Rakefile +2 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/gct.gemspec +38 -0
- data/lib/gct/command/analyze.rb +31 -0
- data/lib/gct/command/config/get.rb +35 -0
- data/lib/gct/command/config/set.rb +35 -0
- data/lib/gct/command/config.rb +14 -0
- data/lib/gct/command/create/oc.rb +37 -0
- data/lib/gct/command/create/swift.rb +37 -0
- data/lib/gct/command/create/third.rb +41 -0
- data/lib/gct/command/create.rb +15 -0
- data/lib/gct/command/init/ci.rb +35 -0
- data/lib/gct/command/init/unit.rb +35 -0
- data/lib/gct/command/init.rb +14 -0
- data/lib/gct/command/op/gems.rb +33 -0
- data/lib/gct/command/op/gitconf.rb +34 -0
- data/lib/gct/command/op/xcache.rb +33 -0
- data/lib/gct/command/op.rb +15 -0
- data/lib/gct/command.rb +48 -0
- data/lib/gct/constant.rb +9 -0
- data/lib/gct/version.rb +6 -0
- data/lib/gct.rb +7 -0
- metadata +161 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ccf99db3caa4e77e3a5d12173bbf4209e7fae7b7d0006be9e4144987e5b6c295
|
|
4
|
+
data.tar.gz: 98f7ee10f64b732dbdfefbe266ef3ecb001a63ae3684fe36f638d0e930620db6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: bc1eea158b989fdfe57dc1e65bef4e51e498e9453e8e6bbaa35688b5fa09af12dcbee82d9a24100d3b7e7a6bef37aab714699505f4725d9d9168d8de19196b38
|
|
7
|
+
data.tar.gz: 8cd71663298caa845f9295948f12454f3c032145f13b2d785400a50a04ee3eb09bc45c35e226f76c5c36c6ae046dc68f085bad93b233f4f3560d8f054ba2d2ed
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at 307113345@qq.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: https://contributor-covenant.org
|
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
gct (0.1.0)
|
|
5
|
+
claide (>= 1.0.2, < 2.0)
|
|
6
|
+
cocoapods (>= 1.8.4)
|
|
7
|
+
colored2 (~> 3.1)
|
|
8
|
+
molinillo (~> 0.6.6)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://gems.ruby-china.com/
|
|
12
|
+
specs:
|
|
13
|
+
CFPropertyList (3.0.2)
|
|
14
|
+
activesupport (4.2.11.1)
|
|
15
|
+
i18n (~> 0.7)
|
|
16
|
+
minitest (~> 5.1)
|
|
17
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
18
|
+
tzinfo (~> 1.1)
|
|
19
|
+
algoliasearch (1.27.2)
|
|
20
|
+
httpclient (~> 2.8, >= 2.8.3)
|
|
21
|
+
json (>= 1.5.1)
|
|
22
|
+
atomos (0.1.3)
|
|
23
|
+
claide (1.0.3)
|
|
24
|
+
cocoapods (1.9.1)
|
|
25
|
+
activesupport (>= 4.0.2, < 5)
|
|
26
|
+
claide (>= 1.0.2, < 2.0)
|
|
27
|
+
cocoapods-core (= 1.9.1)
|
|
28
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
29
|
+
cocoapods-downloader (>= 1.2.2, < 2.0)
|
|
30
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
31
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
32
|
+
cocoapods-stats (>= 1.0.0, < 2.0)
|
|
33
|
+
cocoapods-trunk (>= 1.4.0, < 2.0)
|
|
34
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
35
|
+
colored2 (~> 3.1)
|
|
36
|
+
escape (~> 0.0.4)
|
|
37
|
+
fourflusher (>= 2.3.0, < 3.0)
|
|
38
|
+
gh_inspector (~> 1.0)
|
|
39
|
+
molinillo (~> 0.6.6)
|
|
40
|
+
nap (~> 1.0)
|
|
41
|
+
ruby-macho (~> 1.4)
|
|
42
|
+
xcodeproj (>= 1.14.0, < 2.0)
|
|
43
|
+
cocoapods-core (1.9.1)
|
|
44
|
+
activesupport (>= 4.0.2, < 6)
|
|
45
|
+
algoliasearch (~> 1.0)
|
|
46
|
+
concurrent-ruby (~> 1.1)
|
|
47
|
+
fuzzy_match (~> 2.0.4)
|
|
48
|
+
nap (~> 1.0)
|
|
49
|
+
netrc (~> 0.11)
|
|
50
|
+
typhoeus (~> 1.0)
|
|
51
|
+
cocoapods-deintegrate (1.0.4)
|
|
52
|
+
cocoapods-downloader (1.3.0)
|
|
53
|
+
cocoapods-plugins (1.0.0)
|
|
54
|
+
nap
|
|
55
|
+
cocoapods-search (1.0.0)
|
|
56
|
+
cocoapods-stats (1.1.0)
|
|
57
|
+
cocoapods-trunk (1.4.1)
|
|
58
|
+
nap (>= 0.8, < 2.0)
|
|
59
|
+
netrc (~> 0.11)
|
|
60
|
+
cocoapods-try (1.2.0)
|
|
61
|
+
colored2 (3.1.2)
|
|
62
|
+
concurrent-ruby (1.1.6)
|
|
63
|
+
escape (0.0.4)
|
|
64
|
+
ethon (0.12.0)
|
|
65
|
+
ffi (>= 1.3.0)
|
|
66
|
+
ffi (1.12.2)
|
|
67
|
+
fourflusher (2.3.1)
|
|
68
|
+
fuzzy_match (2.0.4)
|
|
69
|
+
gh_inspector (1.1.3)
|
|
70
|
+
httpclient (2.8.3)
|
|
71
|
+
i18n (0.9.5)
|
|
72
|
+
concurrent-ruby (~> 1.0)
|
|
73
|
+
json (2.3.0)
|
|
74
|
+
minitest (5.14.0)
|
|
75
|
+
molinillo (0.6.6)
|
|
76
|
+
nanaimo (0.2.6)
|
|
77
|
+
nap (1.1.0)
|
|
78
|
+
netrc (0.11.0)
|
|
79
|
+
rake (13.0.1)
|
|
80
|
+
ruby-macho (1.4.0)
|
|
81
|
+
thread_safe (0.3.6)
|
|
82
|
+
typhoeus (1.3.1)
|
|
83
|
+
ethon (>= 0.9.0)
|
|
84
|
+
tzinfo (1.2.7)
|
|
85
|
+
thread_safe (~> 0.1)
|
|
86
|
+
xcodeproj (1.16.0)
|
|
87
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
|
88
|
+
atomos (~> 0.1.3)
|
|
89
|
+
claide (>= 1.0.2, < 2.0)
|
|
90
|
+
colored2 (~> 3.1)
|
|
91
|
+
nanaimo (~> 0.2.6)
|
|
92
|
+
|
|
93
|
+
PLATFORMS
|
|
94
|
+
ruby
|
|
95
|
+
|
|
96
|
+
DEPENDENCIES
|
|
97
|
+
bundler (>= 1.17)
|
|
98
|
+
gct!
|
|
99
|
+
rake (>= 10.0)
|
|
100
|
+
|
|
101
|
+
BUNDLED WITH
|
|
102
|
+
2.1.4
|
data/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Gct
|
|
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/gct`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'gct'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle install
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install gct
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
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).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gct. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/gct/blob/master/CODE_OF_CONDUCT.md).
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Code of Conduct
|
|
39
|
+
|
|
40
|
+
Everyone interacting in the Gct project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gct/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "gct"
|
|
5
|
+
require "cocoapods"
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require "irb"
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/gct.gemspec
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
require "gct/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "gct"
|
|
7
|
+
spec.version = Gct::VERSION
|
|
8
|
+
spec.authors = ["jieming"]
|
|
9
|
+
spec.email = ["307113345@qq.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = %q{"gct ios 自动化脚本工具"}
|
|
12
|
+
spec.description = %q{"gct ios 自动化脚本工具"}
|
|
13
|
+
spec.homepage = "https://gi-dev.ccrgt.com/ios-thirdpart/gct.git"
|
|
14
|
+
|
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
|
+
|
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
21
|
+
end
|
|
22
|
+
spec.bindir = "bin"
|
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
24
|
+
spec.require_paths = ["lib"]
|
|
25
|
+
|
|
26
|
+
# 生产依赖
|
|
27
|
+
# spec.add_dependency
|
|
28
|
+
|
|
29
|
+
# 开发依赖
|
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
32
|
+
|
|
33
|
+
# 运行时依赖
|
|
34
|
+
spec.add_runtime_dependency "claide", ">= 1.0.2", "< 2.0"
|
|
35
|
+
spec.add_runtime_dependency "molinillo", "~> 0.6.6"
|
|
36
|
+
spec.add_runtime_dependency "colored2", "~> 3.1"
|
|
37
|
+
spec.add_runtime_dependency "cocoapods", '>= 1.8.4'
|
|
38
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
require 'cocoapods'
|
|
2
|
+
require 'pathname'
|
|
3
|
+
require 'tmpdir'
|
|
4
|
+
|
|
5
|
+
module Gct
|
|
6
|
+
class Command
|
|
7
|
+
class Analyze < Command
|
|
8
|
+
self.summary = '分析podfile完整依赖链'
|
|
9
|
+
self.description = <<-DESC
|
|
10
|
+
分析podfile完整依赖链,并输出json文件.
|
|
11
|
+
DESC
|
|
12
|
+
|
|
13
|
+
def initialize(argv)
|
|
14
|
+
super
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.options
|
|
18
|
+
[
|
|
19
|
+
].concat(super)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def validate!
|
|
23
|
+
super
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def run
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Config < Command
|
|
4
|
+
class Get < Config
|
|
5
|
+
|
|
6
|
+
self.summary = '获取gct配置'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
获取gct全局配置.
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('NAME', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
puts "获取全局配置成功".green
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Config < Command
|
|
4
|
+
class Set < Config
|
|
5
|
+
|
|
6
|
+
self.summary = '设置全局配置'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
设置gct全局配置.
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
# self.arguments = [
|
|
12
|
+
# CLAide::Argument.new('NAME', true),
|
|
13
|
+
# ]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
# @additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
# help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
# help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
# help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
# help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
puts "设置全局配置成功".green
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Create < Command
|
|
4
|
+
class Oc < Create
|
|
5
|
+
|
|
6
|
+
self.summary = '创建一个oc库'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
创建一个oc pod 库, 包含unit、ci、fastlane,podrepopush 等文件.
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('NAME', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
system "pod lib create #{@name} objc --template-url=#{Constant.GitURL}pod-template.git"
|
|
31
|
+
# TODO 将podspec上传到私有specs上
|
|
32
|
+
puts "一个新的oc pod创建成功!".green
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Create < Command
|
|
4
|
+
class Swift < Create
|
|
5
|
+
|
|
6
|
+
self.summary = '创建一个Swift库'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
创建一个swift pod 库
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('NAME', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
system "pod lib create #{@name} swift --template-url=#{Constant.GitURL}pod-template"
|
|
31
|
+
# TODO 将podspec上传到私有specs上
|
|
32
|
+
puts "一个新的swift pod创建成功!".green
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Create < Command
|
|
4
|
+
class Third < Create
|
|
5
|
+
|
|
6
|
+
self.summary = 'fork一个第三方库'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
fork一个第三个库到私有仓库
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('URL', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@url = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A url for the Pod is required.' unless @url
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def run
|
|
27
|
+
# fork 第三方仓库流程
|
|
28
|
+
`git clone #{@url}`
|
|
29
|
+
dir = @url.match(/[a-z|\-]+(?=\.git)/)
|
|
30
|
+
`cd dir`
|
|
31
|
+
`git remote set-url origin #{Constant.GitURL}#{dir}.git`
|
|
32
|
+
`git push origin master`
|
|
33
|
+
`git push --tags`
|
|
34
|
+
# TODO 将podspec上传到私有specs上
|
|
35
|
+
|
|
36
|
+
puts "fork 第三方库成功!".green
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'gct/command/create/oc'
|
|
2
|
+
require 'gct/command/create/swift'
|
|
3
|
+
require 'gct/command/create/third'
|
|
4
|
+
|
|
5
|
+
module Gct
|
|
6
|
+
class Command
|
|
7
|
+
class Create < Command
|
|
8
|
+
self.abstract_command = true
|
|
9
|
+
self.summary = '创建pod库'
|
|
10
|
+
self.description = <<-DESC
|
|
11
|
+
在当前文件夹下创建pod库,关联并上传到私有仓库!
|
|
12
|
+
DESC
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Init < Command
|
|
4
|
+
class Ci < Init
|
|
5
|
+
|
|
6
|
+
self.summary = '创建ci'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
创建gitlab ci.
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('NAME', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
puts "new ci".green
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Init < Command
|
|
4
|
+
class Unit < Init
|
|
5
|
+
|
|
6
|
+
self.summary = '创建unit'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
集成单元测试.
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('NAME', true),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def initialize(argv)
|
|
16
|
+
@name = argv.shift_argument
|
|
17
|
+
super
|
|
18
|
+
@additional_args = argv.remainder!
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def validate!
|
|
22
|
+
super
|
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def run
|
|
30
|
+
puts "new unit".green
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Op < Command
|
|
4
|
+
class Gems < Op
|
|
5
|
+
|
|
6
|
+
self.summary = '打开gems文件夹'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
打开gems文件夹
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
def initialize(argv)
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def validate!
|
|
19
|
+
super
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def run
|
|
23
|
+
openGems
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def openGems
|
|
27
|
+
puts 'gem路径为:/Library/Ruby/Gems/'.green
|
|
28
|
+
system 'open /Library/Ruby/Gems/'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Op < Command
|
|
4
|
+
class Gitconf < Op
|
|
5
|
+
|
|
6
|
+
self.summary = '打开.gitconfig文件'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
打开.gitconfig文件
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
def initialize(argv)
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def validate!
|
|
19
|
+
super
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def run
|
|
23
|
+
openGitConfig
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def openGitConfig
|
|
27
|
+
puts 'git config路径为:~/.gitconfig'.green
|
|
28
|
+
puts 'git命令为: git config --list'
|
|
29
|
+
`git config --list`
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Gct
|
|
2
|
+
class Command
|
|
3
|
+
class Op < Command
|
|
4
|
+
class Xcache < Op
|
|
5
|
+
|
|
6
|
+
self.summary = '打开Xcode 缓存文件夹'
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
打开Xcode 缓存文件夹
|
|
9
|
+
DESC
|
|
10
|
+
|
|
11
|
+
self.arguments = [
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
def initialize(argv)
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def validate!
|
|
19
|
+
super
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def run
|
|
23
|
+
openXcodeCache
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def openXcodeCache
|
|
27
|
+
puts 'Xcode缓存路径为:~/Library/Developer/Xcode/DerivedData/'.green
|
|
28
|
+
system 'open ~/Library/Developer/Xcode/DerivedData/'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'gct/command/op/gems'
|
|
2
|
+
require 'gct/command/op/gitconf'
|
|
3
|
+
require 'gct/command/op/xcache'
|
|
4
|
+
|
|
5
|
+
module Gct
|
|
6
|
+
class Command
|
|
7
|
+
class Op < Command
|
|
8
|
+
self.abstract_command = true
|
|
9
|
+
self.summary = '打开常用文件'
|
|
10
|
+
self.description = <<-DESC
|
|
11
|
+
打开常用文件夹,并输出路径
|
|
12
|
+
DESC
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/gct/command.rb
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
require 'colored2'
|
|
2
|
+
require 'claide'
|
|
3
|
+
require 'molinillo/errors'
|
|
4
|
+
|
|
5
|
+
module Molinillo
|
|
6
|
+
class ResolverError
|
|
7
|
+
include CLAide::InformativeError
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
module Gct
|
|
12
|
+
class PlainInformative
|
|
13
|
+
include CLAide::InformativeError
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Command < CLAide::Command
|
|
17
|
+
require 'gct/command/create'
|
|
18
|
+
require 'gct/command/init'
|
|
19
|
+
require 'gct/command/config'
|
|
20
|
+
require 'gct/command/analyze'
|
|
21
|
+
require 'gct/command/op'
|
|
22
|
+
|
|
23
|
+
self.abstract_command = true
|
|
24
|
+
self.command = 'gct'
|
|
25
|
+
self.version = VERSION
|
|
26
|
+
self.description = 'gct, a tool to manager pod'
|
|
27
|
+
self.plugin_prefixes = %w(claide gct)
|
|
28
|
+
|
|
29
|
+
def self.options
|
|
30
|
+
[
|
|
31
|
+
['--silent', 'Show nothing'],
|
|
32
|
+
].concat(super)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.run(argv)
|
|
36
|
+
super(argv)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def initialize(argv)
|
|
40
|
+
super
|
|
41
|
+
|
|
42
|
+
unless self.ansi_output?
|
|
43
|
+
Colored2.disable!
|
|
44
|
+
String.send(:define_method, :colorize) { |string, _| string }
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
data/lib/gct/constant.rb
ADDED
data/lib/gct/version.rb
ADDED
data/lib/gct.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: gct
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- jieming
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-04-30 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.17'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.17'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '10.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '10.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: claide
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 1.0.2
|
|
48
|
+
- - "<"
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '2.0'
|
|
51
|
+
type: :runtime
|
|
52
|
+
prerelease: false
|
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: 1.0.2
|
|
58
|
+
- - "<"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '2.0'
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: molinillo
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 0.6.6
|
|
68
|
+
type: :runtime
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: 0.6.6
|
|
75
|
+
- !ruby/object:Gem::Dependency
|
|
76
|
+
name: colored2
|
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '3.1'
|
|
82
|
+
type: :runtime
|
|
83
|
+
prerelease: false
|
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '3.1'
|
|
89
|
+
- !ruby/object:Gem::Dependency
|
|
90
|
+
name: cocoapods
|
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 1.8.4
|
|
96
|
+
type: :runtime
|
|
97
|
+
prerelease: false
|
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: 1.8.4
|
|
103
|
+
description: '"gct ios 自动化脚本工具"'
|
|
104
|
+
email:
|
|
105
|
+
- 307113345@qq.com
|
|
106
|
+
executables: []
|
|
107
|
+
extensions: []
|
|
108
|
+
extra_rdoc_files: []
|
|
109
|
+
files:
|
|
110
|
+
- ".gitignore"
|
|
111
|
+
- CODE_OF_CONDUCT.md
|
|
112
|
+
- Gemfile
|
|
113
|
+
- Gemfile.lock
|
|
114
|
+
- README.md
|
|
115
|
+
- Rakefile
|
|
116
|
+
- bin/console
|
|
117
|
+
- bin/setup
|
|
118
|
+
- gct.gemspec
|
|
119
|
+
- lib/gct.rb
|
|
120
|
+
- lib/gct/command.rb
|
|
121
|
+
- lib/gct/command/analyze.rb
|
|
122
|
+
- lib/gct/command/config.rb
|
|
123
|
+
- lib/gct/command/config/get.rb
|
|
124
|
+
- lib/gct/command/config/set.rb
|
|
125
|
+
- lib/gct/command/create.rb
|
|
126
|
+
- lib/gct/command/create/oc.rb
|
|
127
|
+
- lib/gct/command/create/swift.rb
|
|
128
|
+
- lib/gct/command/create/third.rb
|
|
129
|
+
- lib/gct/command/init.rb
|
|
130
|
+
- lib/gct/command/init/ci.rb
|
|
131
|
+
- lib/gct/command/init/unit.rb
|
|
132
|
+
- lib/gct/command/op.rb
|
|
133
|
+
- lib/gct/command/op/gems.rb
|
|
134
|
+
- lib/gct/command/op/gitconf.rb
|
|
135
|
+
- lib/gct/command/op/xcache.rb
|
|
136
|
+
- lib/gct/constant.rb
|
|
137
|
+
- lib/gct/version.rb
|
|
138
|
+
homepage: https://gi-dev.ccrgt.com/ios-thirdpart/gct.git
|
|
139
|
+
licenses: []
|
|
140
|
+
metadata:
|
|
141
|
+
homepage_uri: https://gi-dev.ccrgt.com/ios-thirdpart/gct.git
|
|
142
|
+
post_install_message:
|
|
143
|
+
rdoc_options: []
|
|
144
|
+
require_paths:
|
|
145
|
+
- lib
|
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
|
+
requirements:
|
|
148
|
+
- - ">="
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '0'
|
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
|
+
requirements:
|
|
153
|
+
- - ">="
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: '0'
|
|
156
|
+
requirements: []
|
|
157
|
+
rubygems_version: 3.0.3
|
|
158
|
+
signing_key:
|
|
159
|
+
specification_version: 4
|
|
160
|
+
summary: '"gct ios 自动化脚本工具"'
|
|
161
|
+
test_files: []
|