nixenvironment 0.0.39 → 0.0.40
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 +4 -4
- data/bin/nixenvironment +19 -15
- data/lib/nixenvironment/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 491270912572211b60be4a4cd5e787fcac5b64e5
|
4
|
+
data.tar.gz: 213cf397adecd0d0612cd68cc72e13682ff56065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb89c78a28cb8f190fbb7e0ff4d93b107f83782153d8069b06405cf5d770726ba9bb5c04299debc3049ba2356a19f0f9ed48f5d56e377606e01d1c592212b49
|
7
|
+
data.tar.gz: ae01db6e53cd87a773e2a6fd22f0183bfb98ae41b88afc9462e3eaa645566855f1a841757b049f1098bbf5ef50071ff6248fbd80c668034953e2a45e54538df5
|
data/bin/nixenvironment
CHANGED
@@ -63,16 +63,17 @@ command :build do |c|
|
|
63
63
|
c.option '--config NAME', String, 'Select configuration'
|
64
64
|
c.option '--ipa TYPES', String, 'Select sign (device, resigned_device, resigned_adhoc, resigned_appstore)'
|
65
65
|
c.option '--ci_build', 'Define NIXENV_CI_BUILD environment variable'
|
66
|
-
c.option '--
|
66
|
+
c.option '--unity_path PATH', String, 'Select unity executable path (UNITY, UNITY_4 or custom path)'
|
67
|
+
c.option '--unity_platform TARGET PLATFORM', String, 'Select target platform for unity build (ios or android)'
|
67
68
|
c.option '--ndsym', 'Disable .dsym generation for ios project'
|
68
69
|
c.option '--icon_tagger MODE', String, 'Set XcodeIconTagger mode (full, short, off)'
|
69
70
|
c.action do |args, options|
|
70
|
-
options.default :config => 'Debug', :ipa => 'device', :icon_tagger => 'full'
|
71
|
+
options.default :config => 'Debug', :ipa => 'device', :icon_tagger => 'full', :unity_path => 'UNITY'
|
71
72
|
|
72
73
|
need_to_build_ios = true
|
73
74
|
|
74
|
-
if options.
|
75
|
-
need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir = unity_build(options.
|
75
|
+
if options.unity_platform and options.unity_platform.length > 0
|
76
|
+
need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir = unity_build(options.unity_platform, options.unity_path)
|
76
77
|
end
|
77
78
|
|
78
79
|
if need_to_build_ios
|
@@ -97,12 +98,12 @@ end
|
|
97
98
|
command :deploy do |c|
|
98
99
|
c.syntax = 'nixenvironment deploy'
|
99
100
|
c.description = 'Deploy built artifacts to given server'
|
100
|
-
c.option '--
|
101
|
+
c.option '--unity_platform TARGET PLATFORM', String, 'Select target platform for unity deploy (ios or android)'
|
101
102
|
c.action do |args, options|
|
102
103
|
need_to_deploy_ios = true
|
103
104
|
|
104
|
-
if options.
|
105
|
-
need_to_deploy_ios, root_working_dir, need_chdir_to_root_working_dir = unity_deploy(options.
|
105
|
+
if options.unity_platform and options.unity_platform.length > 0
|
106
|
+
need_to_deploy_ios, root_working_dir, need_chdir_to_root_working_dir = unity_deploy(options.unity_platform)
|
106
107
|
end
|
107
108
|
|
108
109
|
if need_to_deploy_ios
|
@@ -506,7 +507,7 @@ def build(config, ipa, ndsym, icon_tagger)
|
|
506
507
|
end
|
507
508
|
end
|
508
509
|
|
509
|
-
def unity_build(
|
510
|
+
def unity_build(unity_platform, unity_path)
|
510
511
|
root_working_dir = nil
|
511
512
|
need_chdir_to_root_working_dir = false
|
512
513
|
need_to_build_ios = false
|
@@ -525,14 +526,16 @@ def unity_build(unity)
|
|
525
526
|
abort("Copy UnityBuildAutomationScripts error! #{unity_editor_dir} doesn't exist!")
|
526
527
|
end
|
527
528
|
|
528
|
-
|
529
|
+
unity = ENV[unity_path].nil? ? unity_path : ENV[unity_path]
|
530
|
+
|
531
|
+
case unity_platform
|
529
532
|
when 'ios'
|
530
533
|
need_to_build_ios = true
|
531
534
|
root_working_dir = Dir.pwd
|
532
535
|
ios_project_path = File.join(root_working_dir, UNITY_BUILDS_IOS_PATH)
|
533
536
|
|
534
537
|
p('Generating IOS project from UNITY project ...')
|
535
|
-
unity_success = system("unity -executeMethod NIXBuilder.MakeiOSBuild -projectPath #{root_working_dir.shellescape} -batchmode -logFile -quit -customArgs:path='#{ios_project_path}'")
|
538
|
+
unity_success = system("#{unity} -executeMethod NIXBuilder.MakeiOSBuild -projectPath #{root_working_dir.shellescape} -batchmode -logFile -quit -customArgs:path='#{ios_project_path}'")
|
536
539
|
abort('iOS build unity error!') unless unity_success
|
537
540
|
p('IOS project was generated.')
|
538
541
|
|
@@ -544,12 +547,13 @@ def unity_build(unity)
|
|
544
547
|
$project_to_build = 'Unity-iPhone.xcodeproj'
|
545
548
|
$project_target_to_build = 'Unity-iPhone'
|
546
549
|
when 'android'
|
547
|
-
|
550
|
+
unity_build_android = File.join(BUILD_SCRIPTS_PATH, 'UnityBuildAndroid.py')
|
551
|
+
build_success = system("#{unity_build_android} --unity-path #{unity}")
|
548
552
|
abort('Android build unity error!') unless build_success
|
549
553
|
|
550
554
|
clean_working_copy(false)
|
551
555
|
else
|
552
|
-
abort("Error: Unknown unity target platform '#{
|
556
|
+
abort("Error: Unknown unity target platform '#{unity_platform}'!")
|
553
557
|
end
|
554
558
|
|
555
559
|
return need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir
|
@@ -624,12 +628,12 @@ def deploy
|
|
624
628
|
abort('Deploy error!') unless deploy_success
|
625
629
|
end
|
626
630
|
|
627
|
-
def unity_deploy(
|
631
|
+
def unity_deploy(unity_platform)
|
628
632
|
root_working_dir = nil
|
629
633
|
need_chdir_to_root_working_dir = false
|
630
634
|
need_to_deploy_ios = false
|
631
635
|
|
632
|
-
case
|
636
|
+
case unity_platform
|
633
637
|
when 'ios'
|
634
638
|
root_working_dir = Dir.pwd
|
635
639
|
need_chdir_to_root_working_dir = true
|
@@ -641,7 +645,7 @@ def unity_deploy(unity)
|
|
641
645
|
deploy_success = system(File.join(BUILD_SCRIPTS_PATH, 'DeployAPK.py'))
|
642
646
|
abort('Android deploy unity error!') unless deploy_success
|
643
647
|
else
|
644
|
-
abort("Error: Unknown unity target platform '#{
|
648
|
+
abort("Error: Unknown unity target platform '#{unity_platform}'!")
|
645
649
|
end
|
646
650
|
|
647
651
|
return need_to_deploy_ios, root_working_dir, need_chdir_to_root_working_dir
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nixenvironment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen Arzumanian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|