Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
bb88523a
Unverified
Commit
bb88523a
authored
Feb 01, 2018
by
Samuel Giddins
Committed by
GitHub
Feb 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7180 from keith/ks/set-u-scripts
Add set -u to frameworks and resources copy scripts
parents
3e27274c
7d803426
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
CHANGELOG.md
CHANGELOG.md
+9
-0
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+10
-2
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+11
-2
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
No files found.
CHANGELOG.md
View file @
bb88523a
...
@@ -23,6 +23,15 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -23,6 +23,15 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
*
Store which specs repo a pod comes from in the lockfile.
*
Store which specs repo a pod comes from in the lockfile.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
*
Add
`set -u`
to the copy frameworks and copy resources scripts.
[
Keith Smiley
](
https://github.com/keith
)
[
#7180
](
https://github.com/CocoaPods/CocoaPods/pull/7180
)
*
Allow integrating into static library targets without attempting to copy
resources or embed frameworks unless
`UNLOCALIZED_RESOURCES_FOLDER_PATH`
or
`FRAMEWORKS_FOLDER_PATH`
is set.
[
Samuel Giddins
](
https://github.com/segiddins
)
##### Bug Fixes
##### Bug Fixes
*
Clear input/output paths if they exceed an arbitrary limit
*
Clear input/output paths if they exceed an arbitrary limit
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
bb88523a
...
@@ -96,6 +96,14 @@ module Pod
...
@@ -96,6 +96,14 @@ module Pod
INSTALL_RESOURCES_FUNCTION
=
<<
EOS
INSTALL_RESOURCES_FUNCTION
=
<<
EOS
#!/bin/sh
#!/bin/sh
set -e
set -e
set -u
set -o pipefail
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's no where for us to copy
# resources to, so exit 0 (signalling the script phase was successful).
exit 0
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
...
@@ -108,7 +116,7 @@ XCASSET_FILES=()
...
@@ -108,7 +116,7 @@ XCASSET_FILES=()
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in
case "${TARGETED_DEVICE_FAMILY
:-
}" in
1,2)
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
;;
...
@@ -194,7 +202,7 @@ EOS
...
@@ -194,7 +202,7 @@ EOS
XCASSETS_COMPILE
=
<<
EOS
XCASSETS_COMPILE
=
<<
EOS
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$
XCASSET_FILES
" ]
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$
{XCASSET_FILES:-}
" ]
then
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
...
...
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
bb88523a
...
@@ -37,10 +37,19 @@ module Pod
...
@@ -37,10 +37,19 @@ module Pod
script
=
<<-
SH
.
strip_heredoc
script
=
<<-
SH
.
strip_heredoc
#!/bin/sh
#!/bin/sh
set -e
set -e
set -u
set -o pipefail
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's no where for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
# Used as a return value for each invocation of `strip_invalid_archs` function.
...
@@ -129,10 +138,10 @@ module Pod
...
@@ -129,10 +138,10 @@ module Pod
# Signs a framework with the provided identity
# Signs a framework with the provided identity
code_sign_if_enabled() {
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED
:-
}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS
:-
} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
code_sign_cmd="$code_sign_cmd &"
...
...
cocoapods-integration-specs
@
f3299acb
Subproject commit
382f474f5f42af0cbfeccac15371fe6dd9ee579c
Subproject commit
f3299acb7729e33d7ac944dda6f45ed9c1d8ad20
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment