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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5c47f54246daba6b399cc1474a964800c5d9420
4
- data.tar.gz: c19409541ac93314de5e4407df6afd06c00458a1
3
+ metadata.gz: 491270912572211b60be4a4cd5e787fcac5b64e5
4
+ data.tar.gz: 213cf397adecd0d0612cd68cc72e13682ff56065
5
5
  SHA512:
6
- metadata.gz: fb874cbf42b8f76db8424c965810a535133d6b4f3c352a3774658a2d3e2bb23fc37f504572a10b699f5dcfdf7aa01c9284fab8fa44ed353c5f3370577e0bbd33
7
- data.tar.gz: effcb35401b57ddbaa9cf31317634dee1437bec66715c8db00ff14d5fd89e282d5f1513b8d1ebf504b7a57c4c3b4989797e31a14bd0f67fb115d3569dcd59e21
6
+ metadata.gz: 3fb89c78a28cb8f190fbb7e0ff4d93b107f83782153d8069b06405cf5d770726ba9bb5c04299debc3049ba2356a19f0f9ed48f5d56e377606e01d1c592212b49
7
+ data.tar.gz: ae01db6e53cd87a773e2a6fd22f0183bfb98ae41b88afc9462e3eaa645566855f1a841757b049f1098bbf5ef50071ff6248fbd80c668034953e2a45e54538df5
@@ -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 '--unity TARGET PLATFORM', String, 'Select target platform for unity build (ios or android)'
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.unity and options.unity.length > 0
75
- need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir = unity_build(options.unity)
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 '--unity TARGET PLATFORM', String, 'Select target platform for unity deploy (ios or android)'
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.unity and options.unity.length > 0
105
- need_to_deploy_ios, root_working_dir, need_chdir_to_root_working_dir = unity_deploy(options.unity)
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(unity)
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
- case unity
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
- build_success = system(File.join(BUILD_SCRIPTS_PATH, 'UnityBuildAndroid.py'))
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 '#{unity}'!")
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(unity)
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 unity
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 '#{unity}'!")
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
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.39'
2
+ VERSION = '0.0.40'
3
3
  end
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.39
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-02-25 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler