quickpod 0.0.3

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 +7 -0
  2. data/lib/quickpod +72 -0
  3. metadata +58 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4ab8a3a8dc8f9a33a3b470d2dca92529ac82e4b9
4
+ data.tar.gz: a327235ea121168c81a1d002e6e67948046e670d
5
+ SHA512:
6
+ metadata.gz: 8c484d7e7baa74f27ca2f4498cc6ef14d54c4ce093ec33609cecbaa4795290e34e56f35823bb43731b922432c29d0325e5ea07a6630f0f7fdb334877c55b984a
7
+ data.tar.gz: 175c12e96c18771624d8a941848d007a8ade8db7cecec8379f7cf94fb84cc8e6b38c4f470a1480ced58eca660b08a19e78c7698d343d77359929305048856d9e
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'commander/import'
5
+ require 'fileutils'
6
+ require 'cocoapods'
7
+
8
+ program :name, 'quickpod'
9
+ program :version, '0.0.3'
10
+ program :description, 'release pod quickly'
11
+
12
+ def execute(command, options = {})
13
+ options = { :optional => false }.merge options
14
+ abort unless (system(command) || options[:optional])
15
+ end
16
+
17
+ command :init do |c|
18
+ c.syntax = 'quickpod init [options]'
19
+ c.summary = ''
20
+ c.description = 'initlize the fastlane environment'
21
+ c.example 'description', 'command example'
22
+ c.option '--some-switch', 'Some switch that does something'
23
+ c.action do |args, options|
24
+ # Do something or c.when_called Hamguy::Commands::Init
25
+ dirname = File.join(Dir.pwd,'fastlane')
26
+ # FileUtils.mkdir_p(dirname) unless File.directory?(dirname)
27
+
28
+ filename = File.join(dirname, 'Fastfile')
29
+ # puts filename
30
+ # FileUtils.rm(filename) unless !File.exist?(filename)
31
+ tmppath = "/tmp/releasepod_fastlane_templete"
32
+ execute ("echo Starting Download Fastlane Template.")
33
+ execute "git clone https://github.com/HamGuy/releasepod_fastlane_templete.git #{tmppath}"
34
+ execute ("echo Download Fastlane Template Successed!")
35
+ execute "mv -f #{tmppath}/fastlane #{dirname}"
36
+ execute "rm -rf #{tmppath}"
37
+
38
+ specs = Dir.entries(Dir.home+'/.cocoapods/repos').select{ |item| !item.start_with?('.') }
39
+ spec_name = choose('Please choose the target repo specs?', *specs)
40
+ target_git_repo = ask('Please input the specs git repo address below:')
41
+ outdata = File.read(filename)
42
+ outdata = outdata.gsub('targetSpec', spec_name).gsub('targetRepoGit',target_git_repo)
43
+ File.open(filename, 'w') do |f|
44
+ f.write(outdata)
45
+ end
46
+ execute ("echo Init fastlane configuration successed!")
47
+ end
48
+ end
49
+
50
+ command :update do |c|
51
+ c.syntax = 'quickpod update [options]'
52
+ c.summary = ''
53
+ c.description = 'Update pod to target version'
54
+ c.example 'description', 'command example'
55
+ c.option '--some-switch', 'Some switch that does something'
56
+ c.action do |args, options|
57
+ # Do something or c.when_called quickpod::Commands::Update
58
+ version = args[0]
59
+ message = args[1]
60
+ puts "target-version #{version}"
61
+ puts "commit-message #{message}"
62
+
63
+ if message
64
+ execute "fastlane release_pod version:#{version} message:#{message}"
65
+ else
66
+ command = "fastlane release_pod version:#{version}"
67
+ execute(command)
68
+ end
69
+
70
+ end
71
+ end
72
+
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: quickpod
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - HamGuy
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Simplify the process of relese private pod with fastlane toolchains.
28
+ email: support@hamguy.net
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - lib/quickpod
34
+ homepage: https://rubygems.org/gems/HamGuy15
35
+ licenses:
36
+ - MIT
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubyforge_project:
54
+ rubygems_version: 2.5.2.3
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: Release pod easy and quickly!
58
+ test_files: []