nixenvironment 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/nixenvironment +14 -8
- 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: 3a32b09ec813f8563ff6bcf655eb28f38b82ec91
|
4
|
+
data.tar.gz: fa8efd162bd84c818d022a085241a031a6c003bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 427baa4b633a73a6b32b9e51f819346307a0c599af9da91f6d5ffc3d01905a2de6611620e3814973bbcf25ab8546f081af0033be701ed789d9d69c443474ff24
|
7
|
+
data.tar.gz: 4d4f574aaf7237ce1b3d081bcb6e4efcee3c2254775e15bce5970ddeb1a79a29a42c5f359712d5c9056edba0883d5524a9fb3be26abd7b0ca736cf67bb4e38b4
|
data/bin/nixenvironment
CHANGED
@@ -326,6 +326,12 @@ def supplement_config_settings(config)
|
|
326
326
|
if key and value
|
327
327
|
stripped_key = key.strip
|
328
328
|
stripped_value = value.strip
|
329
|
+
|
330
|
+
# TODO: investigate and fix me! Brutal hack with PRODUCT_SETTINGS_PATH because ruby File & FileUtils can't work with escaped paths
|
331
|
+
if stripped_key == 'PRODUCT_SETTINGS_PATH'
|
332
|
+
@unescaped_product_settings_path = stripped_value
|
333
|
+
end
|
334
|
+
|
329
335
|
@config_settings[stripped_key] ||= stripped_value.shellescape # Assign new value only if assignee is nil
|
330
336
|
end
|
331
337
|
end
|
@@ -521,8 +527,8 @@ end
|
|
521
527
|
def backup_info_plist
|
522
528
|
p('Backuping Info.plist ...')
|
523
529
|
|
524
|
-
@info_plist_backup_name = @
|
525
|
-
FileUtils.cp(@
|
530
|
+
@info_plist_backup_name = @unescaped_product_settings_path + '.backup'
|
531
|
+
FileUtils.cp(@unescaped_product_settings_path, @info_plist_backup_name)
|
526
532
|
|
527
533
|
p('Info.plist was backuped.')
|
528
534
|
end
|
@@ -533,10 +539,10 @@ def update_info_plist(config)
|
|
533
539
|
revision = %x[ source _last_revision.sh && echo ${REVISION} ].strip!
|
534
540
|
monotonic_revision = %x[ source _last_revision.sh && echo ${MONOTONIC_REVISION} ].strip!
|
535
541
|
|
536
|
-
update_success = system("/usr/libexec/PlistBuddy -c 'Set :CFBundleIdentifier \"#{@config_settings['BUNDLE_ID']}\"' \"#{@
|
537
|
-
update_success &&= system("/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion \"#{monotonic_revision}\"' \"#{@
|
538
|
-
update_success &&= system("/usr/libexec/PlistBuddy -c 'Add :Configuration string \"#{config}\"' \"#{@
|
539
|
-
update_success &&= system("/usr/libexec/PlistBuddy -c 'Add :RevisionNumber string \"#{revision}\"' \"#{@
|
542
|
+
update_success = system("/usr/libexec/PlistBuddy -c 'Set :CFBundleIdentifier \"#{@config_settings['BUNDLE_ID']}\"' \"#{@unescaped_product_settings_path}\"")
|
543
|
+
update_success &&= system("/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion \"#{monotonic_revision}\"' \"#{@unescaped_product_settings_path}\"")
|
544
|
+
update_success &&= system("/usr/libexec/PlistBuddy -c 'Add :Configuration string \"#{config}\"' \"#{@unescaped_product_settings_path}\"")
|
545
|
+
update_success &&= system("/usr/libexec/PlistBuddy -c 'Add :RevisionNumber string \"#{revision}\"' \"#{@unescaped_product_settings_path}\"")
|
540
546
|
|
541
547
|
unless update_success
|
542
548
|
restore_info_plist
|
@@ -549,8 +555,8 @@ end
|
|
549
555
|
def restore_info_plist
|
550
556
|
p('Restoring Info.plist ...')
|
551
557
|
|
552
|
-
File.delete(@
|
553
|
-
File.rename(@info_plist_backup_name, @
|
558
|
+
File.delete(@unescaped_product_settings_path)
|
559
|
+
File.rename(@info_plist_backup_name, @unescaped_product_settings_path)
|
554
560
|
|
555
561
|
p('Info.plist was restored.')
|
556
562
|
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.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen Arzumanian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|