nixenvironment 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +45 -1
- data/bin/nixenvironment +70 -8
- data/lib/nixenvironment/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0d484fda2d02d621a0d3bda97065fe96489acf5
|
4
|
+
data.tar.gz: 516d7d978a0d1c54eaec572d7840ba07eae46ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6428eee8a7ebd241bbca830723588a69083dcf137a74f0b9d07400c7623b5eb2e9ff9b4283c225b6e627213f5eb6052b29eaad6f98da32d9cbbbda3694af1d96
|
7
|
+
data.tar.gz: 2a19e68f22d68f82848d8e18b27b37f9a93493c27f9f77f18187477d3fa64911459ae444471d56e798305301b48e53e582f7d6bddaebf7f9b712334ac0599f80
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Nixenvironment installs, updates and manages inner NIX environment stuff to make
|
|
30
30
|
|
31
31
|
test # Build xctest unit tests and run them in simulator
|
32
32
|
|
33
|
-
update # Install or update ninbas and other environment stuff
|
33
|
+
update # Install or update ninbas and other environment stuff
|
34
34
|
|
35
35
|
GLOBAL OPTIONS:
|
36
36
|
|
@@ -43,6 +43,50 @@ Nixenvironment installs, updates and manages inner NIX environment stuff to make
|
|
43
43
|
-t, --trace
|
44
44
|
Display backtrace when an error occurs
|
45
45
|
|
46
|
+
# Options to override default Config
|
47
|
+
|
48
|
+
--project_to_build VALUE
|
49
|
+
|
50
|
+
--project_target_to_build VALUE
|
51
|
+
|
52
|
+
--project_target_to_test VALUE
|
53
|
+
|
54
|
+
--workspace_to_build VALUE
|
55
|
+
|
56
|
+
--workspace_scheme_to_build VALUE
|
57
|
+
|
58
|
+
--workspace_scheme_to_test VALUE
|
59
|
+
|
60
|
+
--sdk VALUE
|
61
|
+
|
62
|
+
--sdk_for_tests VALUE
|
63
|
+
|
64
|
+
--exclude_pattern_for_code_coverage VALUE
|
65
|
+
|
66
|
+
--exclude_pattern_for_code_duplication VALUE
|
67
|
+
|
68
|
+
--deploy_host VALUE
|
69
|
+
|
70
|
+
--deploy_path VALUE
|
71
|
+
|
72
|
+
--deploy_username VALUE
|
73
|
+
|
74
|
+
--deploy_password VALUE
|
75
|
+
|
76
|
+
--icons_path VALUE
|
77
|
+
|
78
|
+
--xctest_destination_device VALUE
|
79
|
+
|
80
|
+
--configuration_files_path VALUE
|
81
|
+
|
82
|
+
--code_coverage_configuration VALUE
|
83
|
+
|
84
|
+
--code_coverage_output_directory VALUE
|
85
|
+
|
86
|
+
--env_var_prefix VALUE
|
87
|
+
|
88
|
+
--infoplist_path VALUE
|
89
|
+
|
46
90
|
EXAMPLES:
|
47
91
|
|
48
92
|
nixenvironment -h
|
data/bin/nixenvironment
CHANGED
@@ -12,6 +12,37 @@ program :name, 'nixenvironment'
|
|
12
12
|
program :version, VERSION
|
13
13
|
program :description, 'NIX projects build and deploy utility'
|
14
14
|
|
15
|
+
global_option ('--project_to_build VALUE') { |value| $project_to_build = value }
|
16
|
+
global_option ('--project_target_to_build VALUE') { |value| $project_target_to_build = value }
|
17
|
+
global_option ('--project_target_to_test VALUE') { |value| $project_target_to_test = value }
|
18
|
+
|
19
|
+
global_option ('--workspace_to_build VALUE') { |value| $workspace_to_build = value }
|
20
|
+
global_option ('--workspace_scheme_to_build VALUE') { |value| $workspace_scheme_to_build = value }
|
21
|
+
global_option ('--workspace_scheme_to_test VALUE') { |value| $workspace_scheme_to_test = value }
|
22
|
+
|
23
|
+
global_option ('--sdk VALUE') { |value| $sdk = value }
|
24
|
+
global_option ('--sdk_for_tests VALUE') { |value| $sdk_for_tests = value }
|
25
|
+
|
26
|
+
global_option ('--exclude_pattern_for_code_coverage VALUE') { |value| $exclude_pattern_for_code_coverage = value }
|
27
|
+
global_option ('--exclude_pattern_for_code_duplication VALUE') { |value| $exclude_pattern_for_code_duplication = value }
|
28
|
+
|
29
|
+
global_option ('--deploy_host VALUE') { |value| $deploy_host = value }
|
30
|
+
global_option ('--deploy_path VALUE') { |value| $deploy_path = value }
|
31
|
+
global_option ('--deploy_username VALUE') { |value| $deploy_username = value }
|
32
|
+
global_option ('--deploy_password VALUE') { |value| $deploy_password = value }
|
33
|
+
|
34
|
+
global_option ('--icons_path VALUE') { |value| $icons_path = value }
|
35
|
+
|
36
|
+
global_option ('--xctest_destination_device VALUE') { |value| $xctest_destination_device = value }
|
37
|
+
|
38
|
+
global_option ('--configuration_files_path VALUE') { |value| $configuration_files_path = value }
|
39
|
+
global_option ('--code_coverage_configuration VALUE') { |value| $code_coverage_configuration = value }
|
40
|
+
global_option ('--code_coverage_output_directory VALUE') { |value| $code_coverage_output_directory = value }
|
41
|
+
|
42
|
+
global_option ('--env_var_prefix VALUE') { |value| $env_var_prefix = value }
|
43
|
+
|
44
|
+
global_option ('--infoplist_path VALUE') { |value| $infoplist_path = value }
|
45
|
+
|
15
46
|
command :update do |c|
|
16
47
|
c.syntax = 'nixenvironment update'
|
17
48
|
c.description = 'Install or update ninbas and other environment stuff'
|
@@ -25,11 +56,11 @@ command :build do |c|
|
|
25
56
|
c.syntax = 'nixenvironment build [options]'
|
26
57
|
c.description = 'Build project for selected configuration and make signed/resigned ipa'
|
27
58
|
c.option '--config NAME', String, 'Select configuration'
|
28
|
-
c.option '--ipa
|
29
|
-
c.option '--ci_build VALUE', String, 'Define NIXENV_CI_BUILD environment variable'
|
59
|
+
c.option '--ipa TYPE', String, 'Select sign (ipa, resigned_ipa_for_device, resigned_ipa_for_adhoc_distribution or resigned_ipa_for_appstore)'
|
60
|
+
c.option '--ci_build VALUE', String, 'Define NIXENV_CI_BUILD environment variable (yes, true, 1 or on to enable)'
|
30
61
|
c.action do |args, options|
|
31
62
|
options.default :config => 'Debug', :ipa => 'ipa', :ci_build => 'yes'
|
32
|
-
read_config
|
63
|
+
read_config(options)
|
33
64
|
enable_ci_build(options.ci_build)
|
34
65
|
build_settings = setup(options.config)
|
35
66
|
prebuild(build_settings)
|
@@ -42,7 +73,7 @@ command :deploy do |c|
|
|
42
73
|
c.syntax = 'nixenvironment deploy'
|
43
74
|
c.description = 'Deploy built artifacts to given server'
|
44
75
|
c.action do |args, options|
|
45
|
-
read_config
|
76
|
+
read_config(options)
|
46
77
|
deploy
|
47
78
|
end
|
48
79
|
end
|
@@ -59,7 +90,7 @@ command :test do |c|
|
|
59
90
|
c.syntax = 'nixenvironment test'
|
60
91
|
c.description = 'Build xctest unit tests and run them in simulator'
|
61
92
|
c.action do |args, options|
|
62
|
-
read_config
|
93
|
+
read_config(options)
|
63
94
|
test
|
64
95
|
end
|
65
96
|
end
|
@@ -68,7 +99,7 @@ command :code_coverage do |c|
|
|
68
99
|
c.syntax = 'nixenvironment code_coverage'
|
69
100
|
c.description = 'Generate xctest unit tests code coverage report'
|
70
101
|
c.action do |args, options|
|
71
|
-
read_config
|
102
|
+
read_config(options)
|
72
103
|
code_coverage
|
73
104
|
end
|
74
105
|
end
|
@@ -77,7 +108,7 @@ command :code_duplication_report do |c|
|
|
77
108
|
c.syntax = 'nixenvironment code_duplication_report'
|
78
109
|
c.description = 'Generate code duplication report for xctest'
|
79
110
|
c.action do |args, options|
|
80
|
-
read_config
|
111
|
+
read_config(options)
|
81
112
|
code_duplication_report
|
82
113
|
end
|
83
114
|
end
|
@@ -156,12 +187,43 @@ def update(ninbas)
|
|
156
187
|
end
|
157
188
|
end
|
158
189
|
|
159
|
-
def read_config
|
190
|
+
def read_config(options)
|
160
191
|
begin
|
161
192
|
@config = YAML.load(File.read(File.join(File.dirname(__FILE__), 'Config')))
|
162
193
|
rescue
|
163
194
|
abort('Config file processing error!')
|
164
195
|
end
|
196
|
+
|
197
|
+
update_config('PROJECT_TO_BUILD', $project_to_build)
|
198
|
+
update_config('PROJECT_TARGET_TO_BUILD', $project_target_to_build)
|
199
|
+
update_config('PROJECT_TARGET_TO_TEST', $project_target_to_test)
|
200
|
+
update_config('WORKSPACE_TO_BUILD', $workspace_to_build)
|
201
|
+
update_config('WORKSPACE_SCHEME_TO_BUILD', $workspace_scheme_to_build)
|
202
|
+
update_config('WORKSPACE_SCHEME_TO_TEST', $workspace_scheme_to_test)
|
203
|
+
update_config('SDK', $sdk)
|
204
|
+
update_config('SDK_FOR_TESTS', $sdk_for_tests)
|
205
|
+
update_config('EXCLUDE_PATTERN_FOR_CODE_COVERAGE', $exclude_pattern_for_code_coverage)
|
206
|
+
update_config('EXCLUDE_PATTERN_FOR_CODE_DUPLICATION', $exclude_pattern_for_code_duplication)
|
207
|
+
update_config('DEPLOY_HOST', $deploy_host)
|
208
|
+
update_config('DEPLOY_PATH', $deploy_path)
|
209
|
+
update_config('DEPLOY_USERNAME', $deploy_username)
|
210
|
+
update_config('DEPLOY_PASSWORD', $deploy_password)
|
211
|
+
update_config('ICONS_PATH', $icons_path)
|
212
|
+
update_config('XCTEST_DESTINATION_DEVICE', $xctest_destination_device)
|
213
|
+
update_config('CONFIGURATION_FILES_PATH', $configuration_files_path)
|
214
|
+
update_config('CODE_COVERAGE_CONFIGURATION', $code_coverage_configuration)
|
215
|
+
update_config('CODE_COVERAGE_OUTPUT_DIRECTORY', $code_coverage_output_directory)
|
216
|
+
update_config('ENV_VAR_PREFIX', $env_var_prefix)
|
217
|
+
update_config('INFOPLIST_PATH', $infoplist_path)
|
218
|
+
end
|
219
|
+
|
220
|
+
def update_config(key, value)
|
221
|
+
if value
|
222
|
+
@config[key] = value
|
223
|
+
p("#{key} |SPECIFIED| directly: #{value}")
|
224
|
+
else
|
225
|
+
p("#{key} |NOT specified| directly. Used from Config: #{@config[key]}")
|
226
|
+
end
|
165
227
|
end
|
166
228
|
|
167
229
|
def enable_ci_build(ci_build)
|