fastlane-plugin-apprepo 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,35 +0,0 @@
1
- require 'rubygems'
2
- require 'json'
3
- require 'net/ssh'
4
- require 'net/sftp'
5
- require 'fastlane_core'
6
-
7
- require_relative 'uploader'
8
-
9
- module Fastlane
10
- module Apprepo
11
- # Should provide metadata for current appcode
12
- class Analyser
13
- attr_accessor :options
14
-
15
- def initialize(options)
16
- self.options = options
17
- end
18
-
19
- # Fetches remote app version from metadata
20
- def fetch_app_version(options)
21
- metadata = Apprepo::Uploader.new(options).download_manifest_only
22
- FastlaneCore::UI.command_output('TODO: Parse version out from metadata')
23
- puts JSON.pretty_generate(metadata) unless metadata.nil?
24
- FastlaneCore::UI.important('TODO: parse out the bundle-version')
25
- metadata['bundle-version']
26
- end
27
-
28
- # only for testing, should be empty
29
- def run
30
- FastlaneCore::UI.message('Analyser run, will fetch_app_version...')
31
- fetch_app_version(options)
32
- end
33
- end
34
- end
35
- end
@@ -1,17 +0,0 @@
1
- module Apprepo
2
- # Responsible for performing commands
3
- # will replace contents of commands-generator.
4
- module Command
5
- # Command class
6
- class Make
7
- def run
8
- fputs 'make run executed'
9
- end
10
- end
11
-
12
- # Legacy classless run method
13
- def run
14
- fputs 'legacy run executed'
15
- end
16
- end
17
- end
@@ -1,121 +0,0 @@
1
- require 'commander'
2
-
3
- HighLine.track_eof = false
4
-
5
- module Fastlane
6
- module Apprepo
7
- # This class is responsible for providing commands with respective actions
8
- class CommandsGenerator
9
- include Commander::Methods
10
-
11
- def self.start
12
- FastlaneCore::UpdateChecker.start_looking_for_update('Apprepo')
13
- new.run
14
- ensure
15
- checker = FastlaneCore::UpdateChecker
16
- checker.show_update_status('Apprepo', Apprepo::VERSION)
17
- end
18
-
19
- def download_manifest
20
- command :download_manifest
21
- end
22
-
23
- def init
24
- command :init
25
- end
26
-
27
- # rubocop:disable Metrics/AbcSize
28
- # rubocop:disable Metrics/MethodLength
29
- # rubocop:disable Metrics/CyclomaticComplexity
30
- # rubocop:disable Metrics/PerceivedComplexity
31
- # rubocop:disable Style/GlobalVars
32
- def run
33
- program :version, Apprepo::VERSION
34
- program :description, Apprepo::DESCRIPTION
35
- program :help, 'Author', 'Matej Sychra <suculent@me.com>'
36
- program :help, 'Website', 'https://github.com/suculent/apprepo'
37
- program :help, 'GitHub', 'https://github.com/suculent/apprepo/tree/master/apprepo'
38
- program :help_formatter, :compact
39
-
40
- generator = FastlaneCore::CommanderGenerator.new
41
- generator.generate(Apprepo::Options.available_options)
42
-
43
- global_option('--verbose') { $verbose = true }
44
-
45
- always_trace!
46
-
47
- command :run do |c|
48
- c.syntax = 'Apprepo'
49
- c.description = 'Upload IPA and metadata to SFTP (e.g. Apprepo)'
50
- c.action do |_args, options|
51
- config = FastlaneCore::Configuration
52
- available_opts = Apprepo::Options.available_options
53
- options = config.create(available_opts, options.__hash__)
54
- loaded = options.load_configuration_file('Repofile')
55
- loaded = true if options[:repo_description] || options[:ipa]
56
-
57
- unless loaded
58
- UI.message('[Apprepo::CommandsGenerator] configuration file not loaded')
59
- if UI.confirm('No Repofile found. Do you want to setup Apprepo?')
60
- require 'Apprepo/setup'
61
- Apprepo::Setup.new.run(options)
62
- return 0
63
- end
64
- end
65
-
66
- Apprepo::Runner.new(options).run
67
- end
68
- end
69
-
70
- command :download_manifest do |c|
71
- c.syntax = 'Apprepo download_manifest'
72
- c.description = 'Download metadata only'
73
- c.action do |_args, options|
74
- config = FastlaneCore::Configuration
75
- available_opts = Apprepo::Options.available_options
76
- options = config.create(available_opts, options.__hash__)
77
- options.load_configuration_file('Repofile')
78
- Apprepo::Runner.new(options).download_manifest
79
- end
80
- end
81
-
82
- command :submit do |c|
83
- c.syntax = 'Apprepo submit'
84
- c.description = 'Submit a specific build-nr, use latest.'
85
- c.action do |_args, options|
86
- config = FastlaneCore::Configuration
87
- available_opts = Apprepo::Options.available_options
88
- options = config.create(available_opts, options.__hash__)
89
- options.load_configuration_file('Repofile')
90
- Apprepo::Runner.new(options).run
91
- end
92
- end
93
-
94
- command :init do |c|
95
- c.syntax = 'Apprepo init'
96
- c.description = 'Create the initial `Apprepo` configuration'
97
- c.action do |_args, options|
98
- if File.exist?('Repofile') || File.exist?('fastlane/Repofile')
99
- UI.important('You already got a running Apprepo setup.')
100
- return 0
101
- end
102
-
103
- require 'Apprepo/setup'
104
- config = FastlaneCore::Configuration
105
- available_opts = Apprepo::Options.available_options
106
- options = config.create(available_opts, options.__hash__)
107
- Apprepo::Runner.new(options)
108
- Apprepo::Setup.new.run(options)
109
- end
110
- end
111
-
112
- # rubocop:enable Metrics/AbcSize
113
- # rubocop:enable Metrics/MethodLength
114
-
115
- default_command :run
116
-
117
- run!
118
- end
119
- end
120
- end
121
- end
@@ -1,29 +0,0 @@
1
-
2
- module Fastlane
3
- module Apprepo
4
- # This class is responsible for detecting values from IPA.
5
- class DetectValues
6
- def run!(options)
7
- find_app_identifier(options)
8
- find_version(options)
9
- end
10
-
11
- def find_app_identifier(options)
12
- return if options[:app_identifier]
13
- if options[:ipa]
14
- # identifier = Apprepo::Analyser.fetch_app_identifier(options[:ipa])
15
- end
16
- options[:app_identifier] = identifier unless identifier.to_s.empty?
17
- input_message = 'The Bundle Identifier of your App: '
18
- options[:app_identifier] ||= UI.input(input_message)
19
- end
20
-
21
- def find_version(options)
22
- unless options[:ipa].nil?
23
- opt = Apprepo::Analyser.new(options)
24
- options[:app_version] ||= opt.fetch_app_version(options[:ipa])
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,88 +0,0 @@
1
- Searching 64 files for "net/ssh" (case sensitive)
2
-
3
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/analyser.rb:
4
- 1 require 'rubygems'
5
- 2 require 'json'
6
- 3: require 'net/ssh'
7
- 4 require 'net/sftp'
8
- 5 require 'fastlane_core'
9
-
10
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/uploader.rb:
11
- 3 require 'rubygems'
12
- 4 require 'json'
13
- 5: require 'net/ssh'
14
- 6 require 'net/sftp'
15
- 7 require 'fastlane_core'
16
-
17
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/analyser.rb:
18
- 1 require 'rubygems'
19
- 2 require 'json'
20
- 3: require 'net/ssh'
21
- 4 require 'net/sftp'
22
- 5 require 'fastlane_core'
23
-
24
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/uploader.rb:
25
- 3 require 'rubygems'
26
- 4 require 'json'
27
- 5: require 'net/ssh'
28
- 6 require 'net/sftp'
29
- 7 require 'fastlane_core'
30
-
31
- 4 matches across 4 files
32
-
33
-
34
- Searching 64 files for "net/ssh" (case sensitive)
35
-
36
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/uploader.rb:
37
- 3 require 'rubygems'
38
- 4 require 'json'
39
- 5: require 'net/ssh'
40
- 6 require 'net/sftp'
41
- 7 require 'fastlane_core'
42
-
43
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/analyser.rb:
44
- 1 require 'rubygems'
45
- 2 require 'json'
46
- 3: require 'net/ssh'
47
- 4 require 'net/sftp'
48
- 5 require 'fastlane_core'
49
-
50
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/uploader.rb:
51
- 3 require 'rubygems'
52
- 4 require 'json'
53
- 5: require 'net/ssh'
54
- 6 require 'net/sftp'
55
- 7 require 'fastlane_core'
56
-
57
- 3 matches across 3 files
58
-
59
-
60
- Searching 64 files for "net/ssh" (case sensitive)
61
-
62
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/analyser.rb:
63
- 1 require 'rubygems'
64
- 2 require 'json'
65
- 3: require 'net/ssh'
66
- 4 require 'net/sftp'
67
- 5 require 'fastlane_core'
68
-
69
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/uploader.rb:
70
- 3 require 'rubygems'
71
- 4 require 'json'
72
- 5: require 'net/ssh'
73
- 6 require 'net/sftp'
74
- 7 require 'fastlane_core'
75
-
76
- 2 matches across 2 files
77
-
78
-
79
- Searching 64 files for "net/ssh" (case sensitive)
80
-
81
- /Users/sychram/Desktop/Dropbox/fastlane-plugin-apprepo/lib/fastlane/plugin/apprepo/helper/uploader.rb:
82
- 3 require 'rubygems'
83
- 4 require 'json'
84
- 5: require 'net-ssh'
85
- 6 require 'net-sftp'
86
- 7 require 'fastlane_core'
87
-
88
- 1 match in 1 file
@@ -1,35 +0,0 @@
1
- require 'rubygems'
2
- require 'json'
3
- require 'net/ssh'
4
- require 'net/sftp'
5
- require 'fastlane_core'
6
-
7
- require_relative 'uploader'
8
-
9
- module Fastlane
10
- module Apprepo
11
- # Should provide metadata for current appcode
12
- class Analyser
13
- attr_accessor :options
14
-
15
- def initialize(options)
16
- self.options = options
17
- end
18
-
19
- # Fetches remote app version from metadata
20
- def fetch_app_version(options)
21
- metadata = Apprepo::Uploader.new(options).download_manifest_only
22
- FastlaneCore::UI.command_output('TODO: Parse version out from metadata')
23
- puts JSON.pretty_generate(metadata) unless metadata.nil?
24
- FastlaneCore::UI.important('TODO: parse out the bundle-version')
25
- metadata['bundle-version']
26
- end
27
-
28
- # only for testing, should be empty
29
- def run
30
- FastlaneCore::UI.message('Analyser run, will fetch_app_version...')
31
- fetch_app_version(options)
32
- end
33
- end
34
- end
35
- end
@@ -1,121 +0,0 @@
1
- require 'commander'
2
-
3
- HighLine.track_eof = false
4
-
5
- module Fastlane
6
- module Apprepo
7
- # This class is responsible for providing commands with respective actions
8
- class CommandsGenerator
9
- include Commander::Methods
10
-
11
- def self.start
12
- FastlaneCore::UpdateChecker.start_looking_for_update('apprepo')
13
- new.run
14
- ensure
15
- checker = FastlaneCore::UpdateChecker
16
- checker.show_update_status('apprepo', Apprepo::VERSION)
17
- end
18
-
19
- def download_manifest
20
- command :download_manifest
21
- end
22
-
23
- def init
24
- command :init
25
- end
26
-
27
- # rubocop:disable Metrics/AbcSize
28
- # rubocop:disable Metrics/MethodLength
29
- # rubocop:disable Metrics/CyclomaticComplexity
30
- # rubocop:disable Metrics/PerceivedComplexity
31
- # rubocop:disable Style/GlobalVars
32
- def run
33
- program :version, Apprepo::VERSION
34
- program :description, Apprepo::DESCRIPTION
35
- program :help, 'Author', 'Matej Sychra <suculent@me.com>'
36
- program :help, 'Website', 'https://github.com/suculent/apprepo'
37
- program :help, 'GitHub', 'https://github.com/suculent/apprepo/tree/master/apprepo'
38
- program :help_formatter, :compact
39
-
40
- generator = FastlaneCore::CommanderGenerator.new
41
- generator.generate(Apprepo::Options.available_options)
42
-
43
- global_option('--verbose') { $verbose = true }
44
-
45
- always_trace!
46
-
47
- command :run do |c|
48
- c.syntax = 'apprepo'
49
- c.description = 'Upload IPA and metadata to SFTP (e.g. Apprepo)'
50
- c.action do |_args, options|
51
- config = FastlaneCore::Configuration
52
- available_opts = Apprepo::Options.available_options
53
- options = config.create(available_opts, options.__hash__)
54
- loaded = options.load_configuration_file('Repofile')
55
- loaded = true if options[:repo_description] || options[:ipa]
56
-
57
- unless loaded
58
- UI.message('[Apprepo::CommandsGenerator] configuration file not loaded')
59
- if UI.confirm('No Repofile found. Do you want to setup apprepo?')
60
- require 'apprepo/setup'
61
- Apprepo::Setup.new.run(options)
62
- return 0
63
- end
64
- end
65
-
66
- Apprepo::Runner.new(options).run
67
- end
68
- end
69
-
70
- command :download_manifest do |c|
71
- c.syntax = 'apprepo download_manifest'
72
- c.description = 'Download metadata only'
73
- c.action do |_args, options|
74
- config = FastlaneCore::Configuration
75
- available_opts = Apprepo::Options.available_options
76
- options = config.create(available_opts, options.__hash__)
77
- options.load_configuration_file('Repofile')
78
- Apprepo::Runner.new(options).download_manifest
79
- end
80
- end
81
-
82
- command :submit do |c|
83
- c.syntax = 'apprepo submit'
84
- c.description = 'Submit a specific build-nr, use latest.'
85
- c.action do |_args, options|
86
- config = FastlaneCore::Configuration
87
- available_opts = Apprepo::Options.available_options
88
- options = config.create(available_opts, options.__hash__)
89
- options.load_configuration_file('Repofile')
90
- Apprepo::Runner.new(options).run
91
- end
92
- end
93
-
94
- command :init do |c|
95
- c.syntax = 'apprepo init'
96
- c.description = 'Create the initial `apprepo` configuration'
97
- c.action do |_args, options|
98
- if File.exist?('Repofile') || File.exist?('fastlane/Repofile')
99
- UI.important('You already got a running apprepo setup.')
100
- return 0
101
- end
102
-
103
- require 'apprepo/setup'
104
- config = FastlaneCore::Configuration
105
- available_opts = Apprepo::Options.available_options
106
- options = config.create(available_opts, options.__hash__)
107
- Apprepo::Runner.new(options)
108
- Apprepo::Setup.new.run(options)
109
- end
110
- end
111
-
112
- # rubocop:enable Metrics/AbcSize
113
- # rubocop:enable Metrics/MethodLength
114
-
115
- default_command :run
116
-
117
- run!
118
- end
119
- end
120
- end
121
- end