fastlane-plugin-altoolalt 1.2.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ce6c8c68423d1ba9017e5436c69fa012acf28cece7ac7553656bc49fbfcee8c0
4
+ data.tar.gz: b841d6b1d472a044ed2c76ca827bba773fa9e7d151f7648d46856d70b9d70743
5
+ SHA512:
6
+ metadata.gz: eb1fa24f8b367aab99595e47485cc29465c5d6dedb52426c46f367f50002fd4327e88e4c12f3efff1becb8d119a46ee052d752c391872f317912e6f350b2b26f
7
+ data.tar.gz: 5189d9630f9ba82dbcddf31be0d40d71adb28d1239609d1c31d87734124d1ada5b2bb6c64bea66b3956ec67047e7a667a6c46011e68707bc080196344fa5d0eb
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Shashikant Jagtap <shashikant.jagtap@icloud.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # altool plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-altool)
4
+
5
+ <a href="https://travis-ci.org/Shashikant86/fastlane-plugin-altool/"><img src="https://img.shields.io/travis/Shashikant86/fastlane-plugin-altool.svg" /></a>
6
+
7
+ ## Getting Started
8
+
9
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-altool`, add it to your project by running:
10
+
11
+ ```bash
12
+ fastlane add_plugin altool
13
+ ```
14
+
15
+ ## Pre-requisite
16
+
17
+ This plugin has configurable Apple ID and password but you probably don't want to hardcode that. You need to have Fastlane setup with `FASTLANE_USER` and `FASTLANE_PASSWORD` environmenal varibales setup. Fastlane will ask it when you run `fastlane init` but if not you have to set these variables.
18
+
19
+ You can set that easily for bash shell
20
+
21
+ ```
22
+ $ export FASTLANE_USER="your_apple_id@yourcompany.com";
23
+ $ export FASTLANE_PASSWORD="your_super_xecret_password";
24
+ ```
25
+
26
+ You can do the same for your choice of shell if you aren't using bash.
27
+
28
+
29
+ ## About altool
30
+
31
+ This plugin can be used to upload IPA to iTunes Connect using altool.
32
+
33
+ Currently Fastlane deliver uses iTMSTransporter to upload an ipa files to iTunes Connect but there is slick way to do this using `altool`
34
+
35
+ This plugin can be used for uploading generated `ipa` file using Gym to iTunes Connect.
36
+
37
+ This plugin assume that, you already have that Fastlane setup and your details are configured as ENV variables in `FASTLANE_USER` and `FASTLANE_PASSWORD` by default.
38
+
39
+
40
+ ## Usage
41
+
42
+ You can configure this plugin using
43
+
44
+ ```ruby
45
+ altool(
46
+ username: ENV["FASTLANE_USER"],
47
+ password: ENV["FASTLANE_PASSWORD"],
48
+ app_type: "ios",
49
+ ipa_path: "./build/Your-ipa.ipa",
50
+ output_format: "xml",
51
+ )
52
+
53
+ ```
54
+
55
+ OR
56
+
57
+ ```ruby
58
+ altool(
59
+ api_key_id: "<YOUR_API_KEY_ID>",
60
+ api_issuer: "<YOUR_API_ISSUER>",
61
+ app_type: "ios",
62
+ ipa_path: "./build/Your-ipa.ipa",
63
+ output_format: "xml",
64
+ )
65
+
66
+ ```
67
+ Security Note:
68
+
69
+ This might print the username and password to build console in the commands, pipe the output to ` /dev/null` or use similar approach so that fastlane don't print command to console.
70
+
71
+ ## Example Project Repo
72
+
73
+ This is a example project [Altool-Demo](https://github.com/Shashikant86/Altool-Demo) available on GitHub which has its own README.
74
+
75
+ ## Run tests for this plugin
76
+
77
+ To run both the tests, and code style validation, run
78
+
79
+ ```
80
+ rake
81
+ ```
82
+
83
+ To automatically fix many of the styling issues, use
84
+ ```
85
+ rubocop -a
86
+ ```
87
+
88
+ ## Issues and Feedback
89
+
90
+ For any other issues and feedback about this plugin, please submit it to this repository.
91
+
92
+ ## Troubleshooting
93
+
94
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
95
+
96
+ ## Using _fastlane_ Plugins
97
+
98
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
99
+
100
+ ## About _fastlane_
101
+
102
+ _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,149 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/altoolalt_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class AltoolaltAction < Action
7
+ def self.run(params)
8
+ altool = `xcrun -f altool`.chomp
9
+ UI.message("altool binary doesn't exist at path: #{altool}") unless File.exist?(altool)
10
+
11
+ UI.message(" ----altool binary exists on your machine----- ")
12
+
13
+ app_type = params[:app_type]
14
+ ipa_path = "\"#{params[:ipa_path]}\""
15
+ output_format = params[:output_format]
16
+
17
+ UI.message("========Validating and Uploading your IPA file to iTunes Connect=========")
18
+ command = [
19
+ altool,
20
+ '--upload-app',
21
+ '-t',
22
+ app_type,
23
+ '-f',
24
+ ipa_path,
25
+ output_format
26
+ ]
27
+
28
+ api_key_id = params[:api_key_id]
29
+ api_issuer = params[:api_issuer]
30
+ if !api_key_id.to_s.empty? && !api_issuer.to_s.empty?
31
+ command += ['--apiKey', api_key_id, '--apiIssuer', api_issuer]
32
+ else
33
+ username = params[:username]
34
+ ENV["ALTOOL_PASSWORD"] = params[:password]
35
+ password = "@env:ALTOOL_PASSWORD"
36
+ if username.to_s.empty? || password.to_s.empty?
37
+ UI.user_error!("You must provide either api_key and api_issuer or username and password")
38
+ end
39
+ command += ['--username', username, '--password', password]
40
+ end
41
+
42
+ Actions.sh(command.join(' '))
43
+ UI.message("========It might take long time to fully upload your IPA file=========")
44
+ end
45
+
46
+ def self.description
47
+ "Upload IPA to iTunes Connect using altool"
48
+ end
49
+
50
+ def self.authors
51
+ ["Shashikant Jagtap", "Anand Biligiri", "Maksym Grebenets"]
52
+ end
53
+
54
+ def self.return_value
55
+ # If your method provides a return value, you can describe here what it does
56
+ end
57
+
58
+ def self.details
59
+ # Optional:
60
+ "This plugin can be used for uploading ipa files to iTunes Connect using altool rather than using ITMSTransporter.. Currently Fastlane deliver upload an ipa file using iTMSTransporter tool. There is another slick command line too called altool that can be used to upload ipa files as well"
61
+ end
62
+
63
+ def self.available_options
64
+ [
65
+ FastlaneCore::ConfigItem.new(key: :app_type,
66
+ env_name: "ALTOOL_APP_TYPE",
67
+ description: "Type or platform of application e.g osx, ios, appletvos ",
68
+ default_value: "ios",
69
+ is_string: true,
70
+ optional: true),
71
+
72
+ FastlaneCore::ConfigItem.new(key: :ipa_path,
73
+ env_name: "ALTOOL_IPA_PATH",
74
+ description: "Path to IPA file ",
75
+ is_string: true,
76
+ default_value: Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last,
77
+ optional: false,
78
+ verify_block: proc do |value|
79
+ value = File.expand_path(value)
80
+ UI.user_error!("Could not find ipa file at path '#{value}'") unless File.exist?(value)
81
+ UI.user_error!("'#{value}' doesn't seem to be an ipa file") unless value.end_with?(".ipa")
82
+ end),
83
+
84
+ FastlaneCore::ConfigItem.new(key: :username,
85
+ env_name: "ALTOOL_USERNAME",
86
+ description: "Your Apple ID for iTunes Connects. This usually FASTLANE_USER environmental variable",
87
+ is_string: true,
88
+ default_value: ENV["FASTLANE_USER"],
89
+ optional: true),
90
+
91
+ FastlaneCore::ConfigItem.new(key: :password,
92
+ env_name: "ALTOOL_PASSWORD",
93
+ description: "Your Apple ID Password for iTunes Connects. This usually FASTLANE_PASSWORD environmental variable",
94
+ is_string: true,
95
+ default_value: ENV["FASTLANE_PASSWORD"],
96
+ optional: true),
97
+
98
+ FastlaneCore::ConfigItem.new(key: :api_key_id,
99
+ env_name: "ALTOOL_API_KEY_ID",
100
+ description: "Only specify the Key ID without the AuthKey_ and .p8. Place the file in ~/private_keys/ or ~/.private_keys/ or ~/.appstoreconnect/private_keys/ or private_keys/ in directory where altool is excuted",
101
+ is_string: true,
102
+ default_value: ENV["ALTOOL_API_KEY"],
103
+ optional: true),
104
+
105
+ FastlaneCore::ConfigItem.new(key: :api_issuer,
106
+ env_name: "ALTOOL_API_ISSUER",
107
+ description: "API Issuer ID for App Store Connect API",
108
+ is_string: true,
109
+ optional: true),
110
+
111
+ FastlaneCore::ConfigItem.new(key: :output_format,
112
+ env_name: "ALTOOL_OUTPUT_FORMAT",
113
+ description: "Output formal xml or normal ",
114
+ default_value: "normal",
115
+ is_string: true,
116
+ optional: true)
117
+
118
+ ]
119
+ end
120
+
121
+ def self.example_code
122
+ [' altool_alt(
123
+ username: ENV["FASTLANE_USER"],
124
+ password: ENV["FASTLANE_PASSWORD"],
125
+ app_type: "ios",
126
+ ipa_path: "./build/Your-ipa.ipa",
127
+ output_format: "xml",
128
+ )
129
+ ',
130
+ ' altool_alt(
131
+ api_key: "<YOUR_API_KEY_ID>",
132
+ api_issuer: "<YOUR_API_ISSUER>",
133
+ app_type: "ios",
134
+ ipa_path: "./build/Your-ipa.ipa",
135
+ output_format: "xml",
136
+ )'
137
+ ]
138
+ end
139
+
140
+ def self.is_supported?(platform)
141
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
142
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
143
+ #
144
+ # [:ios, :mac, :android].include?(platform)
145
+ true
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
5
+
6
+ module Helper
7
+ class AltoolaltHelper
8
+ # class methods that you define here become available in your action
9
+ # as `Helper::AltoolaltHelper.your_method`
10
+ #
11
+ def self.show_message
12
+ UI.message("Hello from the altool_alt plugin helper!")
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Altoolalt
3
+ VERSION = "1.2.0"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/altoolalt/version'
2
+
3
+ module Fastlane
4
+ module Altoolalt
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Altoolalt.all_classes.each do |current|
15
+ require current
16
+ end
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-altoolalt
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Anand Biligiri
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec_junit_formatter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.49.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.49.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-require_tools
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: fastlane
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: 2.75.1
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 2.75.1
139
+ description:
140
+ email: abiligiri@users.noreply.github.com
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files: []
144
+ files:
145
+ - LICENSE
146
+ - README.md
147
+ - lib/fastlane/plugin/altoolalt.rb
148
+ - lib/fastlane/plugin/altoolalt/actions/altoolalt_action.rb
149
+ - lib/fastlane/plugin/altoolalt/helper/altoolalt_helper.rb
150
+ - lib/fastlane/plugin/altoolalt/version.rb
151
+ homepage: https://github.com/abiligiri/fastlane-plugin-altool
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubygems_version: 3.4.10
171
+ signing_key:
172
+ specification_version: 4
173
+ summary: Upload IPA to iTunes Connect using altool
174
+ test_files: []