Skip to content

Commit

Permalink
Bump Swift version in build_podspec.sh (#294)
Browse files Browse the repository at this point in the history
Motivation:

SwiftNIO recently dropped support for Swift 5.0 and Swift 5.1 but our
build_podspec.sh script doesn't reflect this change. Additionally the
list_topsorted_dependencies.sh script always assumed named depenencies
when listing module depenencies. Since our tools version has now been
bumped to 5.2 that's no longer the case and the script produces a bunch
of nulls which throws the build_podspec.sh script off course.

Modifications:

- Bump the Swift version in build_podspec.sh to 5.2
- Include "product" dependencies when listing module dependencies in
  list_topsorted_dependencies.sh

Result:

Podspecs are created as expected
  • Loading branch information
glbrntt authored Aug 17, 2021
1 parent 94d3652 commit f6cde03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/build_podspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Pod::Spec.new do |s|
s.documentation_url = 'https://apple.github.io/swift-nio-http2/'
s.module_name = '${target#Swift}'
s.swift_version = '5.0'
s.swift_version = '5.2'
s.cocoapods_version = '>=1.6.0'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
Expand Down
4 changes: 2 additions & 2 deletions scripts/list_topsorted_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fi

if [[ ! -z "$module_dependency" ]]; then
swift package dump-package | jq -r ".targets |
map(select(.name == \"$module_dependency\" and .type == \"regular\") | .dependencies | map(.byName | first)) | .[] | .[]"
map(select(.name == \"$module_dependency\" and .type == \"regular\") | .dependencies | map(.byName | first) + map(.product | first) ) | del(.[][] | nulls) | .[] | .[]"
exit 0
fi

Expand Down Expand Up @@ -89,4 +89,4 @@ swift package dump-package | jq '.targets |
done
)

rm "$tmpfile"
rm "$tmpfile"

0 comments on commit f6cde03

Please sign in to comment.