airship_hoist 0.0.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/lib/hoist/project_generator.rb +21 -0
- data/lib/hoist/templates/fastfile.tt +178 -0
- data/lib/hoist.rb +11 -0
- metadata +117 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c58223b753eabd70f219c55140d1f4c5d8764a91
|
4
|
+
data.tar.gz: 607b2e3398538a20c4b7f44bac8d60b68e0fc3e4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4b504bff7edf3e09e750602e272721c9884870196df82b8be3b7cc04781cbee3bdb3838f17a516fb0534ca4bb28d04c83d527247e1f62205672a8a95166bb762
|
7
|
+
data.tar.gz: e99d0fd8d5a9377a6575a92aef5429521e3771b568ade12391bec167e8f813afe9b2da59e3226d5c2b0fd024eda0d7755f14ce7fcf8023a565f46af70772a46a
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module Hoist
|
4
|
+
class ProjectGenerator < Thor::Group
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
class_option :test_framework, :default => :test_unit
|
8
|
+
|
9
|
+
argument :bundle_identifier
|
10
|
+
argument :project_name
|
11
|
+
|
12
|
+
def self.source_root
|
13
|
+
File.dirname(__FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_fastfile
|
17
|
+
template('templates/fastfile.tt', "Fastfile")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -0,0 +1,178 @@
|
|
1
|
+
# Customise this file, documentation can be found here:
|
2
|
+
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
|
3
|
+
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
|
4
|
+
# can also be listed using the `fastlane actions` command
|
5
|
+
|
6
|
+
# Change the syntax highlighting to Ruby
|
7
|
+
# All lines starting with a # are ignored when running `fastlane`
|
8
|
+
|
9
|
+
# If you want to automatically update fastlane if a new version is available:
|
10
|
+
# update_fastlane
|
11
|
+
|
12
|
+
# This is the minimum version number required.
|
13
|
+
# Update this, if you use features of a newer version
|
14
|
+
fastlane_version "1.107.0"
|
15
|
+
|
16
|
+
default_platform :ios
|
17
|
+
|
18
|
+
#for random hotel wi-fi behind firewalls.
|
19
|
+
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
|
20
|
+
|
21
|
+
platform :ios do
|
22
|
+
before_all do
|
23
|
+
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Runs all the tests"
|
27
|
+
lane :test do
|
28
|
+
scan
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "Sync certificates to local machine"
|
32
|
+
lane :certificates do
|
33
|
+
match(app_identifier: "<%= bundle_identifier %>", type: "appstore")
|
34
|
+
match(app_identifier: "<%= bundle_identifier %>", type: "development")
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
lane :set_build_number do
|
39
|
+
config = File.read '../package.json'
|
40
|
+
config_data = JSON.parse config
|
41
|
+
build_num = config_data["build"]
|
42
|
+
|
43
|
+
increment_build_number(xcodeproj: './ios/<%= project_name %>.xcodeproj', build_number: build_num)
|
44
|
+
end
|
45
|
+
|
46
|
+
lane :set_version_number do
|
47
|
+
config = File.read '../package.json'
|
48
|
+
config_data = JSON.parse config
|
49
|
+
version_num = config_data["version"]
|
50
|
+
|
51
|
+
increment_version_number(xcodeproj: './ios/<%= project_name %>.xcodeproj', version_number: version_num)
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Submit a new Beta Build to Apple TestFlight"
|
55
|
+
desc "This will also make sure the profile is up to date"
|
56
|
+
lane :beta do
|
57
|
+
puts ENV["PROVISIONING_PROFILE_SPECIFIER"]
|
58
|
+
match(type: "appstore") # more information: https://codesigning.guide
|
59
|
+
set_build_number
|
60
|
+
set_version_number
|
61
|
+
gym(project: './ios/<%= project_name %>.xcodeproj')
|
62
|
+
pilot
|
63
|
+
|
64
|
+
# sh "your_script.sh"
|
65
|
+
# You can also use other beta testing services here (run `fastlane actions`)
|
66
|
+
end
|
67
|
+
|
68
|
+
desc "Deploy a new version to the App Store"
|
69
|
+
lane :release do
|
70
|
+
# snapshot
|
71
|
+
match(type: "appstore")
|
72
|
+
gym # Build your app - more options available
|
73
|
+
deliver(force: true)
|
74
|
+
# frameit
|
75
|
+
end
|
76
|
+
|
77
|
+
# You can define as many lanes as you want
|
78
|
+
|
79
|
+
after_all do |lane|
|
80
|
+
# This block is called, only if the executed lane was successful
|
81
|
+
|
82
|
+
# slack(
|
83
|
+
# message: "Successfully deployed new App Update."
|
84
|
+
# )
|
85
|
+
end
|
86
|
+
|
87
|
+
error do |lane, exception|
|
88
|
+
# slack(
|
89
|
+
# message: exception.message,
|
90
|
+
# success: false
|
91
|
+
# )
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
platform :android do
|
96
|
+
lane :set_version_number do
|
97
|
+
config = File.read '../package.json'
|
98
|
+
config_data = JSON.parse config
|
99
|
+
|
100
|
+
version = config_data["version"]
|
101
|
+
|
102
|
+
path = '../android/app/build.gradle'
|
103
|
+
re = /versionName\s+"(\d+\.\d+\.\d+)"/
|
104
|
+
|
105
|
+
s = File.read(path)
|
106
|
+
s[re, 1] = version
|
107
|
+
|
108
|
+
f = File.new(path, 'w')
|
109
|
+
f.write(s)
|
110
|
+
f.close
|
111
|
+
end
|
112
|
+
|
113
|
+
lane :set_build_number do
|
114
|
+
config = File.read '../package.json'
|
115
|
+
config_data = JSON.parse config
|
116
|
+
|
117
|
+
build = config_data["build"]
|
118
|
+
|
119
|
+
path = '../android/app/build.gradle'
|
120
|
+
re = /versionCode\s+(\d+)/
|
121
|
+
|
122
|
+
s = File.read(path)
|
123
|
+
s[re, 1] = build
|
124
|
+
|
125
|
+
f = File.new(path, 'w')
|
126
|
+
f.write(s)
|
127
|
+
f.close
|
128
|
+
end
|
129
|
+
|
130
|
+
desc "Deploy a new version to the Google Play Store"
|
131
|
+
lane :alpha do
|
132
|
+
deploy(track: 'alpha')
|
133
|
+
end
|
134
|
+
|
135
|
+
lane :beta do
|
136
|
+
deploy(track: 'beta', env: 'production')
|
137
|
+
end
|
138
|
+
|
139
|
+
lane :release do
|
140
|
+
deploy(track: 'production', env: 'production')
|
141
|
+
end
|
142
|
+
|
143
|
+
lane :deploy do |options|
|
144
|
+
set_build_number
|
145
|
+
set_version_number
|
146
|
+
|
147
|
+
gradle \
|
148
|
+
task: "clean",
|
149
|
+
project_dir: "./android"
|
150
|
+
|
151
|
+
gradle(
|
152
|
+
task: "assemble",
|
153
|
+
build_type: "Release",
|
154
|
+
project_dir: "./android"
|
155
|
+
)
|
156
|
+
|
157
|
+
signed = sign_apk(
|
158
|
+
apk_path: "./android/app/build/outputs/apk/app-release-unsigned.apk",
|
159
|
+
keystore_path: "./fastlane/<%= project_name %>.jks",
|
160
|
+
alias: "<%= project_name %>"
|
161
|
+
)
|
162
|
+
|
163
|
+
zipalign(apk_path: "#{lane_context[SharedValues::SIGNED_APK_PATH]}")
|
164
|
+
|
165
|
+
supply(
|
166
|
+
track: options[:track],
|
167
|
+
json_key: "fastlane/key.json",
|
168
|
+
package_name: "<%= bundle_identifier %>",
|
169
|
+
apk: "#{lane_context[SharedValues::SIGNED_APK_PATH]}"
|
170
|
+
)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
175
|
+
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
|
176
|
+
|
177
|
+
# fastlane reports which actions are used
|
178
|
+
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
|
data/lib/hoist.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'hoist/project_generator'
|
3
|
+
|
4
|
+
module Hoist
|
5
|
+
class Cli < Thor
|
6
|
+
desc "fastfile", "Generates a fastfile"
|
7
|
+
register(Hoist::ProjectGenerator, "generate", "generate", "Generates a fastfile, etc...")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
Hoist::Cli.start( ARGV )
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: airship_hoist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Airship
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
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
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.14'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.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: pry-nav
|
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: Hoist helps you generate and manage your mobile apps, particularly those
|
84
|
+
built with React Native.
|
85
|
+
email: builders@teamairship.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- lib/hoist.rb
|
91
|
+
- lib/hoist/project_generator.rb
|
92
|
+
- lib/hoist/templates/fastfile.tt
|
93
|
+
homepage: http://rubygems.org/gems/airship_hoist
|
94
|
+
licenses:
|
95
|
+
- MIT
|
96
|
+
metadata: {}
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.6.8
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: Making it easy to generate and deploy your mobile applications.
|
117
|
+
test_files: []
|