fastlane-craft 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79cf9934116aa72a5f5c920913971d8a2eedbcd2488b567a198f8bfc41c9ff34
|
4
|
+
data.tar.gz: a0e421bca8a4669f4548606e8f249973387d979fd052b9a1e105a7e7341e325f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e3996451bb9a8a764ce8d9805783761ff0c468e7d59c57959815f84d0a2b47c7e8cd297a4980e75db761106b979aa585bb9e8ddafb03de70b49de58d88100c1
|
7
|
+
data.tar.gz: '0186e2bfaf6b5bda81b1b305b28b4bdb1759400ba6cb1088f3fc007b41f50e367ed83c9a83e44506d62f51dddd606be3fcd7d583d1566f826deed2a15073be79'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'tag_release_manager'
|
2
2
|
|
3
3
|
module Fastlane
|
4
4
|
module Actions
|
@@ -6,7 +6,10 @@ module Fastlane
|
|
6
6
|
include FastlaneCraft
|
7
7
|
|
8
8
|
def self.run(params)
|
9
|
-
|
9
|
+
TagReleaseManager.new(
|
10
|
+
params[:info_plist_path],
|
11
|
+
params[:target_suffix]
|
12
|
+
).release
|
10
13
|
end
|
11
14
|
|
12
15
|
#####################################################
|
@@ -27,6 +30,14 @@ module Fastlane
|
|
27
30
|
key: :target_suffix,
|
28
31
|
description: 'Specific target suffix',
|
29
32
|
optional: true
|
33
|
+
),
|
34
|
+
FastlaneCore::ConfigItem.new(
|
35
|
+
key: :info_plist_path,
|
36
|
+
description: 'target info plist path',
|
37
|
+
verify_block: proc do |value|
|
38
|
+
msg = 'empty info plist path'
|
39
|
+
UI.user_error!(msg) unless value && !value.empty?
|
40
|
+
end
|
30
41
|
)
|
31
42
|
]
|
32
43
|
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
module FastlaneCraft
|
2
|
+
class TagReleaseManager
|
3
|
+
def initialize(info_plist_path, target_suffix = nil)
|
4
|
+
raise 'Invalid Info Plist Path' if info_plist_path.empty?
|
5
|
+
@info_plist_path = info_plist_path
|
6
|
+
@target_suffix = target_suffix
|
7
|
+
end
|
8
|
+
|
9
|
+
def release
|
10
|
+
puts 'releasing :)'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# lane :bump_version do |options|
|
16
|
+
# if tag_version < app_version
|
17
|
+
# UI.user_error! 'The version of the tag is less than the actual app version'
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
# if tag_version > app_version
|
21
|
+
# version = tag_version.to_s
|
22
|
+
# build_version = Gem::Version.new(version.to_s + '.0')
|
23
|
+
# elsif tag_version == app_version && options[:bump_patch]
|
24
|
+
# version = app_version.to_s
|
25
|
+
# build_version = bumped_version(app_build_version)
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# set_app_version(version)
|
29
|
+
# set_app_build_version(build_version)
|
30
|
+
# UI.success "Version was successfully bumped to #{version}/#{build_version}"
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# lane :push_version_bump do
|
34
|
+
# commit_version_bump(
|
35
|
+
# message: "Bump version to #{app_version}/#{app_build_version}",
|
36
|
+
# force: true
|
37
|
+
# )
|
38
|
+
#
|
39
|
+
# push_to_git_remote(
|
40
|
+
# local_branch: 'master',
|
41
|
+
# remote_branch: 'master'
|
42
|
+
# )
|
43
|
+
# end
|
44
|
+
#
|
45
|
+
# lane :release do
|
46
|
+
# bump_version
|
47
|
+
# certificates
|
48
|
+
# archive_appstore
|
49
|
+
# upload_to_testflight(skip_submission: true)
|
50
|
+
# bump_version(bump_patch: true)
|
51
|
+
# push_version_bump
|
52
|
+
# broadcast_release
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# def bumped_version(v)
|
56
|
+
# value = v.to_s
|
57
|
+
# value[-1] = (value[-1].to_i + 1).to_s
|
58
|
+
# Gem::Version.new(value)
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# def tag_version
|
62
|
+
# version_format = /[0-9.]+/
|
63
|
+
# tag = last_git_tag.match(version_format)[0]
|
64
|
+
# Gem::Version.new(tag)
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# def set_app_version(v)
|
68
|
+
# value = set_info_plist_value(
|
69
|
+
# path: info_plist_path,
|
70
|
+
# key: info_plist_version_key,
|
71
|
+
# value: v.to_s
|
72
|
+
# )
|
73
|
+
# end
|
74
|
+
#
|
75
|
+
# def set_app_build_version(v)
|
76
|
+
# value = set_info_plist_value(
|
77
|
+
# path: info_plist_path,
|
78
|
+
# key: info_plist_build_version_key,
|
79
|
+
# value: v.to_s
|
80
|
+
# )
|
81
|
+
# end
|
82
|
+
#
|
83
|
+
# def app_version
|
84
|
+
# value = get_info_plist_value(path: info_plist_path, key: info_plist_version_key)
|
85
|
+
# Gem::Version.new(value)
|
86
|
+
# end
|
87
|
+
#
|
88
|
+
# def app_build_version
|
89
|
+
# value = get_info_plist_value(path: info_plist_path, key: info_plist_build_version_key)
|
90
|
+
# Gem::Version.new(value)
|
91
|
+
# end
|
92
|
+
#
|
93
|
+
# def info_plist_version_key
|
94
|
+
# 'CFBundleShortVersionString'
|
95
|
+
# end
|
96
|
+
#
|
97
|
+
# def info_plist_build_version_key
|
98
|
+
# 'CFBundleVersion'
|
99
|
+
# end
|
100
|
+
#
|
101
|
+
# def info_plist_path
|
102
|
+
# File.join(Dir.pwd, '../PixelArt/Supporting Files/Info.plist')
|
103
|
+
# end
|
@@ -6,12 +6,8 @@ module Fastlane
|
|
6
6
|
include FastlaneCraft
|
7
7
|
|
8
8
|
def self.run(params)
|
9
|
-
TelegramNotifier.
|
10
|
-
|
11
|
-
chat_id: params[:chat_id],
|
12
|
-
message: params[:message],
|
13
|
-
parse_mode: params[:parse_mode]
|
14
|
-
)
|
9
|
+
notifier = TelegramNotifier.new(bot_api_token: params[:bot_api_token], chat_id: params[:chat_id])
|
10
|
+
notifier.notify(message: params[:message], parse_mode: params[:parse_mode])
|
15
11
|
end
|
16
12
|
|
17
13
|
#####################################################
|
@@ -6,9 +6,16 @@ module FastlaneCraft
|
|
6
6
|
MARKDOWN = 'Markdown'.freeze
|
7
7
|
|
8
8
|
class TelegramNotifier
|
9
|
-
def
|
10
|
-
|
11
|
-
|
9
|
+
def initialize(bot_api_token:, chat_id:)
|
10
|
+
raise 'Invalid Bot Api Token' if bot_api_token.empty?
|
11
|
+
raise 'Invalid Chat Id' if chat_id.empty?
|
12
|
+
@bot_api_token = bot_api_token
|
13
|
+
@chat_id = chat_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def notify(message:, parse_mode: nil)
|
17
|
+
uri = URI.parse("https://api.telegram.org/bot#{@bot_api_token}/sendMessage")
|
18
|
+
params = { text: message, chat_id: @chat_id }
|
12
19
|
params[:parse_mode] = parse_mode unless parse_mode.nil?
|
13
20
|
Net::HTTP.post_form(uri, params)
|
14
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-craft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sroik
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -103,6 +103,7 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- lib/fastlane_craft.rb
|
105
105
|
- lib/fastlane_craft/tag_release.rb
|
106
|
+
- lib/fastlane_craft/tag_release_manager.rb
|
106
107
|
- lib/fastlane_craft/telegram.rb
|
107
108
|
- lib/fastlane_craft/telegram_notifier.rb
|
108
109
|
- lib/fastlane_craft/version.rb
|