fastlane-plugin-fivethree_ionic 0.1.0 → 0.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1282694113bf998748a2fe0d5f498dc13cac10ca
|
4
|
+
data.tar.gz: '085330210e92e21e319b71c61b76800cc7af594d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a96ad29f059bcef1a97b570b6aa292c544d036cead14afe5103f792c5c271d5e739236739d3ff5014a47d94fbb0bfb011d8b57e5e12b618d2567b67600b32d0
|
7
|
+
data.tar.gz: 84e90567187b22299f5c6d2c872be1bfe20ffbec73b3675cc380dc66f1abf74242ea02a8085a949466c7e391d1b5a3e0ad5d563450b762ec0fa08399a2d87beb
|
@@ -7,11 +7,31 @@ module Fastlane
|
|
7
7
|
class FivUpdateVersionAction < Action
|
8
8
|
def self.run(params)
|
9
9
|
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
10
|
-
|
10
|
+
old_version = sh "echo \"cat //*[local-name()='widget']/@version\" | xmllint --shell #{params[:pathToConfigXML]}| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
|
11
|
+
old_version = old_version.delete!("\n")
|
12
|
+
puts "current version: #{old_version}"
|
11
13
|
|
12
|
-
#
|
14
|
+
puts "Insert new version number, current version in config.xml is '#{old_version}' (Leave empty and press enter to skip this step): "
|
15
|
+
new_version_number = STDIN.gets.strip
|
16
|
+
puts "new version: #{new_version_number}"
|
17
|
+
|
18
|
+
if new_version_number.length > 0
|
19
|
+
puts "take new version number"
|
20
|
+
version = new_version_number
|
21
|
+
else
|
22
|
+
puts "take old version number"
|
23
|
+
version = old_version
|
24
|
+
end
|
25
|
+
|
26
|
+
text = File.read(params[:pathToConfigXML])
|
27
|
+
|
28
|
+
new_contents = text
|
29
|
+
.gsub(/version="[0-9.]*"/, "version=\"#{version}\"")
|
30
|
+
|
31
|
+
File.open(params[:pathToConfigXML], "w") {|file| file.puts new_contents}
|
32
|
+
|
33
|
+
return version
|
13
34
|
|
14
|
-
# Actions.lane_context[SharedValues::FIV_UPDATE_VERSION_CUSTOM_VALUE] = "my_val"
|
15
35
|
end
|
16
36
|
|
17
37
|
#####################################################
|
@@ -31,20 +51,15 @@ module Fastlane
|
|
31
51
|
def self.available_options
|
32
52
|
# Define all options your action supports.
|
33
53
|
|
34
|
-
# Below a few examples
|
35
54
|
[
|
36
|
-
FastlaneCore::ConfigItem.new(key: :
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
env_name: "FL_FIV_UPDATE_VERSION_DEVELOPMENT",
|
45
|
-
description: "Create a development certificate instead of a distribution one",
|
46
|
-
is_string: false, # true: verifies the input is a string, false: every kind of value
|
47
|
-
default_value: false) # the default value if the user didn't provide one
|
55
|
+
FastlaneCore::ConfigItem.new(key: :pathToConfigXML,
|
56
|
+
env_name: "FIV_INCREMENT_BUILD_CONFIG",
|
57
|
+
description: "---",
|
58
|
+
optional: false,
|
59
|
+
verify_block: proc do | value |
|
60
|
+
UI.user_error!("Couldnt find config.xml! Please change your path.") unless File.exist?(value)
|
61
|
+
end ,
|
62
|
+
type: String)
|
48
63
|
]
|
49
64
|
end
|
50
65
|
|
@@ -57,7 +72,7 @@ module Fastlane
|
|
57
72
|
end
|
58
73
|
|
59
74
|
def self.return_value
|
60
|
-
|
75
|
+
"returns the new version specified in config.xml"
|
61
76
|
end
|
62
77
|
|
63
78
|
def self.authors
|