fastlane-plugin-souyuz-ventaapps 0.8.2
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/LICENSE +21 -0
- data/README.md +58 -0
- data/lib/fastlane/plugin/souyuz-ventaapps/actions/app_version_action.rb +95 -0
- data/lib/fastlane/plugin/souyuz-ventaapps/actions/souyuz_action.rb +67 -0
- data/lib/fastlane/plugin/souyuz-ventaapps/version.rb +5 -0
- data/lib/fastlane/plugin/souyuz.rb +16 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e3e4da8891d31bdaabc43ecc3b0875b19377d62063495497b6269f61b12e9788
|
4
|
+
data.tar.gz: 42778d9a116ad5828e86903a92b79e65d2f378cbc791e361f2db3b2714633507
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 58f680f0bed4acb84486ab7f2b611046a04bc4cbea4574cf48252e9f8b5b44b0d37e29b8fd7b78a147ba00336578a344c482f7f066bda4b48fc0d9e759e8a65b
|
7
|
+
data.tar.gz: 8ae1dfb8b48f564839a1e58f8833cb712f2b4832816fca90d7fdc9a690d71a1f39c705c327f1be3bd453342e0adc7469c13f13d8577f0200a89ba82d61ad1d4d
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Felix Rudat
|
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,58 @@
|
|
1
|
+
# souyuz plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-souyuz)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-souyuz`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin souyuz
|
11
|
+
```
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
Check out the following lanes or the [example `Fastfile`](fastlane/Fastfile) to see how to use souyuz.
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
platform :ios do
|
19
|
+
lane :example do
|
20
|
+
souyuz(
|
21
|
+
platform: "ios",
|
22
|
+
build_configuration: "Release",
|
23
|
+
plist_path: "./iOS/Info.plist"
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
platform :android do
|
28
|
+
lane :example do
|
29
|
+
souyuz(
|
30
|
+
platform: "android",
|
31
|
+
build_configuration: "Release",
|
32
|
+
keystore_path: "{PATH_TO_YOUR_KEYSTORE}",
|
33
|
+
keystore_alias: "{ALIAS_OF_YOUR_KEYSTORE}",
|
34
|
+
keystore_password: "{YOUR_SUPER_SECRET_KEYSTORE_PASSWORD}"
|
35
|
+
)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
## About souyuz
|
41
|
+
|
42
|
+
A fastlane component to make Xamarin builds a breeze
|
43
|
+
|
44
|
+
## Issues and Feedback
|
45
|
+
|
46
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
47
|
+
|
48
|
+
## Troubleshooting
|
49
|
+
|
50
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
51
|
+
|
52
|
+
## Using `fastlane` Plugins
|
53
|
+
|
54
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
55
|
+
|
56
|
+
## About `fastlane`
|
57
|
+
|
58
|
+
`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,95 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class AppVersionAction < Action
|
4
|
+
def self.run(values)
|
5
|
+
require 'souyuz'
|
6
|
+
values[:platform] = ::Souyuz::Platform.from_lane_context(Actions.lane_context)
|
7
|
+
::Souyuz.config = values
|
8
|
+
|
9
|
+
if ::Souyuz.project.ios? or ::Souyuz.project.osx?
|
10
|
+
version, build = set_plist_version values[:version], values[:build], values[:plist_path]
|
11
|
+
elsif ::Souyuz.project.android?
|
12
|
+
version, build = set_manifest_version values[:version], values[:build], values[:manifest_path]
|
13
|
+
end
|
14
|
+
|
15
|
+
UI.important "Current Version is:"
|
16
|
+
UI.message " Version: #{version}"
|
17
|
+
UI.message " Build: #{build}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.set_plist_version(version, build, plist_path = nil)
|
21
|
+
plist_path ||= ::Souyuz.config[:plist_path]
|
22
|
+
version ||= other_action.get_info_plist_value(path: plist_path, key: 'CFBundleShortVersionString')
|
23
|
+
build ||= other_action.get_info_plist_value(path: plist_path, key: 'CFBundleVersion')
|
24
|
+
|
25
|
+
other_action.set_info_plist_value(
|
26
|
+
path: plist_path,
|
27
|
+
key: 'CFBundleShortVersionString',
|
28
|
+
value: version
|
29
|
+
)
|
30
|
+
|
31
|
+
other_action.set_info_plist_value(
|
32
|
+
path: plist_path,
|
33
|
+
key: 'CFBundleVersion',
|
34
|
+
value: build
|
35
|
+
)
|
36
|
+
|
37
|
+
[version, build]
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.set_manifest_version(version, build, manifest_path = nil)
|
41
|
+
manifest_path ||= ::Souyuz.config[:manifest_path]
|
42
|
+
|
43
|
+
# parse the doc
|
44
|
+
f1 = File.open(manifest_path)
|
45
|
+
doc = Nokogiri::XML(f1)
|
46
|
+
f1.close
|
47
|
+
|
48
|
+
attrs = doc.xpath('//manifest')[0]
|
49
|
+
|
50
|
+
version ||= attrs['android:versionName']
|
51
|
+
build ||= attrs['android:versionCode']
|
52
|
+
|
53
|
+
if version or build
|
54
|
+
attrs['android:versionName'] = version if version
|
55
|
+
attrs['android:versionCode'] = build if build
|
56
|
+
|
57
|
+
# save the doc
|
58
|
+
File.open(manifest_path, 'w') do |f2|
|
59
|
+
f2.print(doc.to_xml)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
[version, build]
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.description
|
67
|
+
"Easily set or print app version with `app_version`"
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.author
|
71
|
+
"Felix Rudat"
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.available_options
|
75
|
+
require 'souyuz'
|
76
|
+
::Souyuz::Options.available_options.concat(
|
77
|
+
[
|
78
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
79
|
+
env_name: "FL_APP_VERSION",
|
80
|
+
description: "App version value",
|
81
|
+
optional: true),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :build,
|
83
|
+
env_name: "FL_APP_BUILD",
|
84
|
+
description: "App build number value",
|
85
|
+
optional: true)
|
86
|
+
]
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.is_supported?(platform)
|
91
|
+
true
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
# for calabash
|
5
|
+
APP_BUNDLE_PATH = :APP_BUNDLE_PATH
|
6
|
+
APP_OUTPUT_PATH = :APP_OUTPUT_PATH
|
7
|
+
end
|
8
|
+
|
9
|
+
class SouyuzAction < Action
|
10
|
+
def self.run(values)
|
11
|
+
require 'souyuz'
|
12
|
+
values[:platform] = ::Souyuz::Platform.from_lane_context(Actions.lane_context)
|
13
|
+
::Souyuz.config = values
|
14
|
+
|
15
|
+
if ::Souyuz.project.ios? or ::Souyuz.project.osx?
|
16
|
+
absolute_ipa_path = File.expand_path(::Souyuz::Manager.new.work(values))
|
17
|
+
absolute_app_path = File.join(values[:output_path], "#{values[:assembly_name]}.app")
|
18
|
+
absolute_dsym_path = absolute_ipa_path.gsub(".ipa", ".app.dSYM.zip")
|
19
|
+
|
20
|
+
Actions.lane_context[SharedValues::APP_OUTPUT_PATH] = absolute_app_path
|
21
|
+
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_ipa_path
|
22
|
+
Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path if File.exist?(absolute_dsym_path)
|
23
|
+
ENV[SharedValues::APP_OUTPUT_PATH.to_s] = absolute_app_path
|
24
|
+
ENV[SharedValues::APP_BUNDLE_PATH.to_s] = absolute_app_path # for calabash
|
25
|
+
ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
|
26
|
+
ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path if File.exist?(absolute_dsym_path)
|
27
|
+
|
28
|
+
absolute_ipa_path
|
29
|
+
elsif ::Souyuz.project.android?
|
30
|
+
# check if keystore vars are set but password is missing
|
31
|
+
if values[:keystore_path] && values[:keystore_alias]
|
32
|
+
unless values[:keystore_password]
|
33
|
+
::Souyuz.config[:keystore_password] = ask("Password (for #{values[:keystore_alias]}): ") { |q| q.echo = "*" }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
absolute_apk_path = File.expand_path(::Souyuz::Manager.new.work(values))
|
37
|
+
|
38
|
+
Actions.lane_context[SharedValues::GRADLE_BUILD_TYPE] = values[:build_configuration]
|
39
|
+
Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] = absolute_apk_path
|
40
|
+
|
41
|
+
absolute_apk_path
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.description
|
46
|
+
"Easily build and sign your app using `souyuz`"
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.return_value
|
50
|
+
"The absolute path to the generated app file"
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.author
|
54
|
+
"Felix Rudat"
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.available_options
|
58
|
+
require 'souyuz'
|
59
|
+
::Souyuz::Options.available_options
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.is_supported?(platform)
|
63
|
+
true
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/souyuz/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Souyuz
|
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::Souyuz.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-souyuz-ventaapps
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Felix Rudat
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-08-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: souyuz-ventaapps
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.8.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.8.1
|
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: fastlane
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.103.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.103.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
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
|
+
description:
|
84
|
+
email: voydz@hotmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- LICENSE
|
90
|
+
- README.md
|
91
|
+
- lib/fastlane/plugin/souyuz-ventaapps/actions/app_version_action.rb
|
92
|
+
- lib/fastlane/plugin/souyuz-ventaapps/actions/souyuz_action.rb
|
93
|
+
- lib/fastlane/plugin/souyuz-ventaapps/version.rb
|
94
|
+
- lib/fastlane/plugin/souyuz.rb
|
95
|
+
homepage: https://github.com/VentaApps/souyuz
|
96
|
+
licenses:
|
97
|
+
- MIT
|
98
|
+
metadata: {}
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 2.7.8
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: A fastlane component to make Xamarin builds a breeze
|
119
|
+
test_files: []
|