fastlane-plugin-souyuz 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/souyuz/actions/app_version_action.rb +95 -0
- data/lib/fastlane/plugin/souyuz/actions/souyuz_action.rb +62 -0
- data/lib/fastlane/plugin/souyuz/version.rb +6 -0
- data/lib/fastlane/plugin/souyuz.rb +17 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 056df47d720c05dffccbff4cb410087be09e644a
|
4
|
+
data.tar.gz: 4dbd54f759cb2388c1e8ec369b4a6d5a32014213
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f86332907cb8111834e4bf6808b3ae15540617fb5205395e219cfb977717e64db08e8d603ffd8a63d549991fe2fca6a49b0a60ac55c9b34a944bb2894c8a740b
|
7
|
+
data.tar.gz: 46e1dbb7a472fd4b3050499d0d80209494f9c42a4d80b8990a4600af29a9deb49e9e9d68898290d5386694ca6f6e8b74ce488c0992176436cee39238177374bb
|
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,52 @@
|
|
1
|
+
# souyuz plugin
|
2
|
+
|
3
|
+
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](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
|
+
## About souyuz
|
14
|
+
|
15
|
+
A fastlane component to make Xamarin builds a breeze
|
16
|
+
|
17
|
+
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
|
+
|
23
|
+
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
+
|
25
|
+
## Run tests for this plugin
|
26
|
+
|
27
|
+
To run both the tests, and code style validation, run
|
28
|
+
|
29
|
+
```
|
30
|
+
rake
|
31
|
+
```
|
32
|
+
|
33
|
+
To automatically fix many of the styling issues, use
|
34
|
+
```
|
35
|
+
rubocop -a
|
36
|
+
```
|
37
|
+
|
38
|
+
## Issues and Feedback
|
39
|
+
|
40
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
41
|
+
|
42
|
+
## Troubleshooting
|
43
|
+
|
44
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
|
+
|
46
|
+
## Using `fastlane` Plugins
|
47
|
+
|
48
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
|
+
|
50
|
+
## About `fastlane`
|
51
|
+
|
52
|
+
`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
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module Fastlane
|
3
|
+
module Actions
|
4
|
+
class AppVersionAction < Action
|
5
|
+
def self.run(values)
|
6
|
+
require 'souyuz'
|
7
|
+
values[:platform] = ::Souyuz::Platform.from_lane_context(Actions.lane_context)
|
8
|
+
::Souyuz.config = values
|
9
|
+
|
10
|
+
if ::Souyuz.project.ios? or ::Souyuz.project.osx?
|
11
|
+
version, build = set_plist_version values[:version], values[:build], values[:plist_path]
|
12
|
+
elsif ::Souyuz.project.android?
|
13
|
+
version, build = set_manifest_version values[:version], values[:build], values[:manifest_path]
|
14
|
+
end
|
15
|
+
|
16
|
+
UI.important "Current Version is:"
|
17
|
+
UI.message " Version: #{version}"
|
18
|
+
UI.message " Build: #{build}"
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.set_plist_version(version, build, plist_path = nil)
|
22
|
+
plist_path ||= ::Souyuz.config[:plist_path]
|
23
|
+
version ||= other_action.get_info_plist_value(path: plist_path, key: 'CFBundleShortVersionString')
|
24
|
+
build ||= other_action.get_info_plist_value(path: plist_path, key: 'CFBundleVersion')
|
25
|
+
|
26
|
+
other_action.set_info_plist_value(
|
27
|
+
path: plist_path,
|
28
|
+
key: 'CFBundleShortVersionString',
|
29
|
+
value: version
|
30
|
+
)
|
31
|
+
|
32
|
+
other_action.set_info_plist_value(
|
33
|
+
path: plist_path,
|
34
|
+
key: 'CFBundleVersion',
|
35
|
+
value: build
|
36
|
+
)
|
37
|
+
|
38
|
+
[version, build]
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.set_manifest_version(version, build, manifest_path = nil)
|
42
|
+
manifest_path ||= ::Souyuz.config[:manifest_path]
|
43
|
+
|
44
|
+
# parse the doc
|
45
|
+
f = File.open(manifest_path)
|
46
|
+
doc = Nokogiri::XML(f)
|
47
|
+
f.close
|
48
|
+
|
49
|
+
attrs = doc.xpath('//manifest')[0]
|
50
|
+
|
51
|
+
version ||= attrs['android:versionName']
|
52
|
+
build ||= attrs['android:versionCode']
|
53
|
+
|
54
|
+
if version or build
|
55
|
+
attrs['android:versionName'] = version if version
|
56
|
+
attrs['android:versionCode'] = build if build
|
57
|
+
|
58
|
+
# save the doc
|
59
|
+
File.open(manifest_path, 'w') do |f|
|
60
|
+
f.print(doc.to_xml)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
[version, build]
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.description
|
68
|
+
"Easily set or print app version with `app_version`"
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.author
|
72
|
+
"Felix Rudat"
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.available_options
|
76
|
+
require 'souyuz'
|
77
|
+
::Souyuz::Options.available_options.concat(
|
78
|
+
[
|
79
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
80
|
+
env_name: "FL_APP_VERSION",
|
81
|
+
description: "App version value",
|
82
|
+
optional: true),
|
83
|
+
FastlaneCore::ConfigItem.new(key: :build,
|
84
|
+
env_name: "FL_APP_BUILD",
|
85
|
+
description: "App build number value",
|
86
|
+
optional: true),
|
87
|
+
])
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.is_supported?(platform)
|
91
|
+
true
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module Fastlane
|
3
|
+
module Actions
|
4
|
+
module SharedValues
|
5
|
+
# for calabash
|
6
|
+
APP_BUNDLE_PATH = :APP_BUNDLE_PATH
|
7
|
+
APP_OUTPUT_PATH = :APP_OUTPUT_PATH
|
8
|
+
end
|
9
|
+
|
10
|
+
class SouyuzAction < Action
|
11
|
+
def self.run(values)
|
12
|
+
require 'souyuz'
|
13
|
+
values[:platform] = ::Souyuz::Platform.from_lane_context(Actions.lane_context)
|
14
|
+
::Souyuz.config = values
|
15
|
+
|
16
|
+
if ::Souyuz.project.ios? or ::Souyuz.project.osx?
|
17
|
+
absolute_ipa_path = File.expand_path(::Souyuz::Manager.new.work(values))
|
18
|
+
absolute_app_path = File.join(values[:output_path], "#{values[:assembly_name]}.app")
|
19
|
+
absolute_dsym_path = absolute_ipa_path.gsub(".ipa", ".app.dSYM.zip")
|
20
|
+
|
21
|
+
Actions.lane_context[SharedValues::APP_OUTPUT_PATH] = absolute_app_path
|
22
|
+
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_ipa_path
|
23
|
+
Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path if File.exist?(absolute_dsym_path)
|
24
|
+
ENV[SharedValues::APP_OUTPUT_PATH.to_s] = absolute_app_path
|
25
|
+
ENV[SharedValues::APP_BUNDLE_PATH.to_s] = absolute_app_path # for calabash
|
26
|
+
ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
|
27
|
+
ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path if File.exist?(absolute_dsym_path)
|
28
|
+
|
29
|
+
absolute_ipa_path
|
30
|
+
elsif ::Souyuz.project.android?
|
31
|
+
absolute_apk_path = File.expand_path(::Souyuz::Manager.new.work(values))
|
32
|
+
|
33
|
+
Actions.lane_context[SharedValues::GRADLE_BUILD_TYPE] = values[:build_configuration]
|
34
|
+
Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] = absolute_apk_path
|
35
|
+
|
36
|
+
absolute_apk_path
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.description
|
41
|
+
"Easily build and sign your app using `souyuz`"
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.return_value
|
45
|
+
"The absolute path to the generated app file"
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.author
|
49
|
+
"Felix Rudat"
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.available_options
|
53
|
+
require 'souyuz'
|
54
|
+
::Souyuz::Options.available_options
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.is_supported?(platform)
|
58
|
+
true
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'fastlane/plugin/souyuz/version'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Souyuz
|
6
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
7
|
+
def self.all_classes
|
8
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# By default we want to import all available actions and helpers
|
14
|
+
# A plugin can contain any number of actions and plugins
|
15
|
+
Fastlane::Souyuz.all_classes.each do |current|
|
16
|
+
require current
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-souyuz
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Felix Rudat
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: souyuz
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.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.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
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: bundler
|
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: rake
|
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: fastlane
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.17.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.17.1
|
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.rb
|
92
|
+
- lib/fastlane/plugin/souyuz/actions/app_version_action.rb
|
93
|
+
- lib/fastlane/plugin/souyuz/actions/souyuz_action.rb
|
94
|
+
- lib/fastlane/plugin/souyuz/version.rb
|
95
|
+
homepage: http://rubygems.org/gems/fastlane-plugin-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.5.0
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: A fastlane component to make Xamarin builds a breeze
|
119
|
+
test_files: []
|