diff --git a/TIFoundationUtils/PlaygroundPodfile b/TIFoundationUtils/PlaygroundPodfile index ab5d58c0..92fd45c2 100644 --- a/TIFoundationUtils/PlaygroundPodfile +++ b/TIFoundationUtils/PlaygroundPodfile @@ -1,3 +1,5 @@ +ENV["DEVELOPMENT_INSTALL"] = "true" + target 'TIFoundationUtils' do platform :ios, 10.0 use_frameworks! diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile index ab5d58c0..92fd45c2 100644 --- a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile @@ -1,3 +1,5 @@ +ENV["DEVELOPMENT_INSTALL"] = "true" + target 'TIFoundationUtils' do platform :ios, 10.0 use_frameworks! diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 81fb8902..f31f6a4a 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.ios.deployment_target = '10.0' s.swift_versions = ['5.3'] - sources = '**/Sources/**/*' - if File.basename(Dir.getwd) == s.name # installing using :path => + sources = '**/Sources/**/*.swift' + if ENV["DEVELOPMENT_INSTALL"] # installing using :path => s.source_files = sources s.exclude_files = s.name + '.app' else diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 607019eb..8774d395 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.0' s.swift_versions = ['5.3'] - sources = 'Sources/**/*' - if File.basename(Dir.getwd) == s.name # installing using :path => + sources = 'Sources/**/*.swift' + if ENV["DEVELOPMENT_INSTALL"] # installing using :path => s.source_files = sources s.exclude_files = s.name + '.app' else diff --git a/project-scripts/push_to_podspecs.sh b/project-scripts/push_to_podspecs.sh index edfa19bd..e96cdebd 100755 --- a/project-scripts/push_to_podspecs.sh +++ b/project-scripts/push_to_podspecs.sh @@ -1,10 +1,18 @@ #!/bin/sh -# Find source dir -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Description: +# Pushes podspec files to Podspecs repo +# +# Parameters: +# $1 - additional parameters for pod repo push command +# +# Required environment variables: +# SRCROOT - path to project folder. +# +# Examples of usage: +# SRCROOT=`pwd` ./project-scripts/push_to_podspecs.sh +# -cd "$DIR" - -for module_name in $(cat ordered_modules_list.txt); do - bundle exec pod repo push git@github.com:TouchInstinct/Podspecs ${module_name}/${module_name}.podspec --allow-warnings +for module_name in $(cat ${SRCROOT}/project-scripts/ordered_modules_list.txt); do + bundle exec pod repo push git@github.com:TouchInstinct/Podspecs ${SRCROOT}/${module_name}/${module_name}.podspec "$@" --allow-warnings done