Skip to content

Commit

Permalink
- Pods update
Browse files Browse the repository at this point in the history
- podUpdate.command update
  • Loading branch information
anton-plebanovich committed Oct 13, 2018
1 parent 275b37b commit d48ef2a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
1 change: 0 additions & 1 deletion Example/ObjectMapperAdditions/MyModel.swift
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import APExtensions
import ObjectMapper
import ObjectMapperAdditions

Expand Down
4 changes: 2 additions & 2 deletions Example/ObjectMapperAdditions/ViewController.swift
Expand Up @@ -7,13 +7,13 @@
//

import UIKit
import APExtensions
import ObjectMapperAdditions
import RealmSwift
import ContactsUI


class ViewController: UIViewController {
// CNContactPickerDelegate

//-----------------------------------------------------------------------------
// MARK: - UIViewController Methods
//-----------------------------------------------------------------------------
Expand Down
15 changes: 4 additions & 11 deletions Example/Podfile
Expand Up @@ -21,15 +21,8 @@ end


post_install do |installer|
# TODO: Remove pods when they converted to Swift 4
# Your list of targets here.
myTargets = ['Quick', 'Nimble']

installer.pods_project.targets.each do |target|
if myTargets.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
# Add podInstall.command and podUpdate.command shell scripts to Pods project
pods_project = installer.pods_project
pods_project.new_file "../podInstall.command"
pods_project.new_file "../podUpdate.command"
end
14 changes: 7 additions & 7 deletions Example/Podfile.lock
Expand Up @@ -15,13 +15,13 @@ PODS:
- "ObjectMapper+Realm (0.6)":
- ObjectMapper
- RealmSwift
- ObjectMapperAdditions (4.2.0):
- ObjectMapperAdditions (4.2.1):
- ObjectMapper
- ObjectMapperAdditions/Core (= 4.2.0)
- ObjectMapperAdditions/Realm (= 4.2.0)
- ObjectMapperAdditions/Core (4.2.0):
- ObjectMapperAdditions/Core (= 4.2.1)
- ObjectMapperAdditions/Realm (= 4.2.1)
- ObjectMapperAdditions/Core (4.2.1):
- ObjectMapper
- ObjectMapperAdditions/Realm (4.2.0):
- ObjectMapperAdditions/Realm (4.2.1):
- ObjectMapper
- ObjectMapperAdditions/Core
- RealmSwift
Expand Down Expand Up @@ -59,11 +59,11 @@ SPEC CHECKSUMS:
Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae
ObjectMapper: b612bf8c8e99c4dc0bb6013a51f7c27966ed5da9
"ObjectMapper+Realm": 4cf44ed3202a73f08594e21e13eb3f8aa9b5a664
ObjectMapperAdditions: 9297bbd3388158e9221de89b1dab682b7ab0b61e
ObjectMapperAdditions: 9456c3e8708e2e5e9ff1341b83ff42d70d0f73e0
Quick: 2623cb30d7a7f41ca62f684f679586558f483d46
Realm: 92f09a102692b96a9a10e9617f214f15c5ab85fc
RealmSwift: 5f0481cd658bb751c509314b964a35eaa264d2cf

PODFILE CHECKSUM: 17b8277317cc3824f70b09e44d8e1b1d13591425
PODFILE CHECKSUM: fe286d75a60a66c1a58ac66636d41168849d2348

COCOAPODS: 1.5.3
26 changes: 25 additions & 1 deletion Example/podUpdate.command
Expand Up @@ -3,4 +3,28 @@
base_dir=$(dirname "$0")
cd "$base_dir"

pod update
# Listing available pods
echo ""
echo "Pods list:"

# Blue color
printf '\033[0;34m'

# Pods list
grep -o "pod \'[a-zA-Z0-9\.\/-]*\'" Podfile | sed -e "s/^pod \'//" -e "s/\'$//"

# No color
printf '\033[0m'
echo ""

# Asking which one to update
read -p "Which pod to update? Press enter to update all: " pod_name

# Check if pod has git repository attached
if grep -cq "\- ${pod_name} (from " Podfile.lock; then
# Pod has git repository attached. No need to fetch pods repo.
pod update $pod_name --no-repo-update
else
# Trigger specific or all pod update
pod update $pod_name
fi

0 comments on commit d48ef2a

Please sign in to comment.