nixenvironment 0.0.37 → 0.0.38

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: d233c5bc47f433ab59ff12000961e0bc8fbc60cb
4
- data.tar.gz: b153a6f3d5ab86a5b0527834ae47f7139598a767
3
+ metadata.gz: 7c81ee2f6fc5ab2485889d1246e7dc7709fcaca7
4
+ data.tar.gz: 8351fabd6b626aa47924d21fd9d69bda73795096
5
5
  SHA512:
6
- metadata.gz: 7c1e0498ffbc2f0500c19586b2f0cee8856affba3f8183269efbccdb3f7416ef99f2415c2ee50ff676d2fae0e2769b001b13a75bab3cacb00e4d1a28437253fc
7
- data.tar.gz: 963f1840d25c356979339018052c8e767d4969b7334e28b00f3319937012082a8de1ac0b18934d7a7eca1c1d5e24fc99ea6c4086e24224cb914eb3e8475b2a42
6
+ metadata.gz: 0903aabc22641305f0a5dfb4a12d486183bc8d099bbab3c02188d647c54fc46a0307773391feeb03f0d9628424c0f2a8d5c149d1b6f42b1facd94f08b00f55b3
7
+ data.tar.gz: 7cdc54b824b2bad93cc4f492b2fe2239ef10d20ee184006b0aecbbb21a55f8df4b142dee78739c2032716fe351153b6d84d15345cf8eeb99a1cf434809fc08da
data/bin/Config CHANGED
@@ -23,7 +23,7 @@ EXCLUDE_PATTERN_FOR_CODE_DUPLICATION: "**/Vendor|**/Scripts|**/Pods"
23
23
  # DEPLOY_PASSWORD:
24
24
 
25
25
  # set these var if you want to add build number on icon
26
- ICONS_PATH: Resources/Icons
26
+ ICONS_PATH: Resources/Images/Images.xcassets
27
27
 
28
28
  # specifies the device to be used as destination
29
29
  XCTEST_DESTINATION_DEVICE: platform=iOS Simulator,name=iPhone 5,OS=latest
data/bin/nixenvironment CHANGED
@@ -65,8 +65,9 @@ command :build do |c|
65
65
  c.option '--ci_build', 'Define NIXENV_CI_BUILD environment variable'
66
66
  c.option '--unity TARGET PLATFORM', String, 'Select target platform for unity build (ios or android)'
67
67
  c.option '--ndsym', 'Disable .dsym generation for ios project'
68
+ c.option '--icon_tagger MODE', String, 'Set XcodeIconTagger mode (full, short, off)'
68
69
  c.action do |args, options|
69
- options.default :config => 'Debug', :ipa => 'ipa'
70
+ options.default :config => 'Debug', :ipa => 'ipa', :icon_tagger => 'full'
70
71
 
71
72
  need_to_build_ios = true
72
73
 
@@ -80,7 +81,7 @@ command :build do |c|
80
81
  enable_ci_build(options.ci_build)
81
82
  supplement_config_settings(options.config)
82
83
  prebuild(options.config)
83
- build(options.config, options.ipa, options.ndsym)
84
+ build(options.config, options.ipa, options.ndsym, options.icon_tagger)
84
85
  restore_info_plist
85
86
  rescue
86
87
  raise # re-rise exception but chdir to root_working_dir in ensure block first if needed
@@ -400,7 +401,6 @@ end
400
401
 
401
402
  def prebuild(config)
402
403
  save_revision = File.join(BUILD_SCRIPTS_PATH, 'SaveRevision.sh')
403
- tag_icons = File.join(BUILD_SCRIPTS_PATH, 'XcodeIconTagger/tagIcons.sh')
404
404
 
405
405
  system("#{save_revision}")
406
406
 
@@ -411,12 +411,9 @@ def prebuild(config)
411
411
  save_build_env_vars
412
412
 
413
413
  update_info_plist(config)
414
-
415
- # TODO: rewrite tagIcons.sh
416
- # system("#{tag_icons} #{@config_settings['ICONS_PATH']}")
417
414
  end
418
415
 
419
- def build(config, ipa, ndsym)
416
+ def build(config, ipa, ndsym, icon_tagger)
420
417
  build = File.join(BUILD_SCRIPTS_PATH, 'Build.py')
421
418
 
422
419
  build_success = nil
@@ -466,6 +463,21 @@ def build(config, ipa, ndsym)
466
463
  abort('Build error!')
467
464
  end
468
465
 
466
+ if config == 'Release'
467
+ p('IconTagger: configuration is Release. Skipping...')
468
+ else
469
+ case icon_tagger
470
+ when 'full'
471
+ tag_icon(false)
472
+ when 'short'
473
+ tag_icon(true)
474
+ when 'off'
475
+ p('IconTagger is disabled. Skipping...')
476
+ else
477
+ p("Unknown IconTagger mode: '#{icon_tagger}'. Skipping...")
478
+ end
479
+ end
480
+
469
481
  case ipa
470
482
  # create .ipa file from last built app product
471
483
  when 'ipa'
@@ -540,6 +552,26 @@ def unity_build(unity)
540
552
  return need_to_build_ios, root_working_dir, need_chdir_to_root_working_dir
541
553
  end
542
554
 
555
+ def tag_icon(short_version)
556
+ tagger_directory = File.join(BUILD_SCRIPTS_PATH, 'XcodeIconTagger')
557
+ utility = File.join(tagger_directory, 'IconTagger')
558
+ plist_path = @unescaped_product_settings_path
559
+ version = %x[ /usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' '#{plist_path}' ].strip!
560
+ monotonic_revision = %x[ source _last_revision.sh && echo ${MONOTONIC_REVISION} ].strip!
561
+ style = short_version ? 'OneLine' : 'TwoLine'
562
+ mask_path = File.join(tagger_directory, "masks/#{style}Mask.png")
563
+ icons_dir = File.join(Dir.pwd, @config_settings['ICONS_PATH'])
564
+ app_product = File.join(@config_settings['BUILT_PRODUCTS_DIR'], @config_settings['EXECUTABLE_NAME']) + '.app'
565
+
566
+ system("#{utility} --shortVersion=#{version}\
567
+ --buildNumber=#{monotonic_revision}\
568
+ --style=#{style}\
569
+ --maskPath=\"#{mask_path}\"\
570
+ --plist=\"#{plist_path}\"\
571
+ --sourceIconsPath=\"#{icons_dir}\"\
572
+ --destinationIconsPath=#{app_product}")
573
+ end
574
+
543
575
  def backup_info_plist
544
576
  p('Backuping Info.plist ...')
545
577
 
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.37'
2
+ VERSION = '0.0.38'
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.37
4
+ version: 0.0.38
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-04 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.2.2
111
+ rubygems_version: 2.4.5
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: NIX projects build and deploy utility