nixenvironment 0.0.31 → 0.0.32

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: 2b52d2ffdc327d5174565c56f40290a095745858
4
- data.tar.gz: d4920940b6a21231d647fd2cdcea4f8e5620f169
3
+ metadata.gz: a1a40f3920aa6d88fb30a0cae382d19cb2422258
4
+ data.tar.gz: 967212aaced9759fe047dcb7290e2caff7b08057
5
5
  SHA512:
6
- metadata.gz: 48fe45b5c57547811c44f05b80f16934c2fe4b2cc13c697afed9c972b034e9f82b29d7a62ed6754a03f0826c23708198aacd219f0e458e19b603b6954ca511b0
7
- data.tar.gz: 47a4132ac00566d8f84d8e1fc64b2e98f7f4d07a4eb6abee4a2aa8b0545f9ee270d8539602e59596cec5584a2fded28c3cdf27c662228a1830700751a9d60aa1
6
+ metadata.gz: 5ae3af97bc91e56310b368d1ad2369afdec71a3fc255460227cf36102af644a5e596de0b52ed3efcd52d0c63beb169cff2470052cebe3fb072cee995a283c6ac
7
+ data.tar.gz: 4203401e94cb293ee1febb5e36b9159b9d34d6e1ced77b37811f76da958df35f5dd28c0b633b02d1d8064e2f3631fa45fce442a209ec1592257723df1140036b
data/bin/nixenvironment CHANGED
@@ -69,21 +69,22 @@ command :build do |c|
69
69
 
70
70
  if options.unity and options.unity.length > 0
71
71
  need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir = unity_build(options.unity)
72
- return unless need_to_build_ios
73
72
  end
74
73
 
75
- begin
76
- read_config_settings
77
- enable_ci_build(options.ci_build)
78
- supplement_config_settings(options.config)
79
- prebuild(options.config)
80
- build(options.config, options.ipa)
81
- restore_info_plist
82
- rescue
83
- raise # re-rise exception but chdir to root_working_dir in ensure block first if needed
84
- ensure
85
- if need_chdir_to_root_working_dir and root_working_dir
86
- Dir.chdir(root_working_dir)
74
+ if not defined? need_to_build_ios or need_to_build_ios
75
+ begin
76
+ read_config_settings
77
+ enable_ci_build(options.ci_build)
78
+ supplement_config_settings(options.config)
79
+ prebuild(options.config)
80
+ build(options.config, options.ipa)
81
+ restore_info_plist
82
+ rescue
83
+ raise # re-rise exception but chdir to root_working_dir in ensure block first if needed
84
+ ensure
85
+ if need_chdir_to_root_working_dir and root_working_dir
86
+ Dir.chdir(root_working_dir)
87
+ end
87
88
  end
88
89
  end
89
90
  end
@@ -509,11 +510,10 @@ def unity_build(unity)
509
510
 
510
511
  p('Generating IOS project from UNITY project ...')
511
512
  unity_success = system("unity -executeMethod NIXBuilder.MakeiOSBuild -projectPath #{root_working_dir.shellescape} -batchmode -logFile -quit -customArgs:path='#{ios_project_path}'")
512
- abort('Build unity error!') unless unity_success
513
+ abort('iOS build unity error!') unless unity_success
513
514
  p('IOS project was generated.')
514
515
 
515
516
  need_chdir_to_root_working_dir = true
516
-
517
517
  clean_working_copy(false)
518
518
 
519
519
  Dir.chdir(ios_project_path)
@@ -521,7 +521,10 @@ def unity_build(unity)
521
521
  $project_to_build = 'Unity-iPhone.xcodeproj'
522
522
  $project_target_to_build = 'Unity-iPhone'
523
523
  when 'android'
524
- #TODO: implement me!
524
+ build_success = system(File.join(BUILD_SCRIPTS_PATH, 'UnityBuildAndroid.py'))
525
+ abort('Android build unity error!') unless build_success
526
+
527
+ clean_working_copy(false)
525
528
  else
526
529
  abort("Error: Unknown unity target platform '#{unity}'!")
527
530
  end
@@ -567,7 +570,7 @@ def restore_info_plist
567
570
  end
568
571
 
569
572
  def deploy
570
- deploy = File.join(BUILD_SCRIPTS_PATH, 'Deploy.sh')
573
+ deploy = File.join(BUILD_SCRIPTS_PATH, 'DeployIPA.sh')
571
574
 
572
575
  deploy_host = @config_settings['DEPLOY_HOST'].nil? || @config_settings['DEPLOY_HOST'].empty? ? ENV['DEPLOY_HOST'] : @config_settings['DEPLOY_HOST']
573
576
  deploy_path = @config_settings['DEPLOY_PATH'].nil? || @config_settings['DEPLOY_PATH'].empty? ? ENV['DEPLOY_PATH'] : @config_settings['DEPLOY_PATH']
@@ -592,7 +595,8 @@ def unity_deploy(unity)
592
595
  ios_project_path = File.join(root_working_dir, UNITY_BUILDS_IOS_PATH)
593
596
  Dir.chdir(ios_project_path)
594
597
  when 'android'
595
- #TODO: implement me!
598
+ deploy_success = system(File.join(BUILD_SCRIPTS_PATH, 'DeployAPK.py'))
599
+ abort('Android deploy unity error!') unless deploy_success
596
600
  else
597
601
  abort("Error: Unknown unity target platform '#{unity}'!")
598
602
  end
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.31'
2
+ VERSION = '0.0.32'
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.31
4
+ version: 0.0.32
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-01-15 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler