@@ -67,6 +67,7 @@ usage: fetch-source.sh [--swift-scheme <scheme>|--swift-tag <tag>
6767 [--boringssl-version <version>]
6868 [--clone-with-ssh]
6969 [--source-dir <path>]
70+ [--github-comment <comment>]
7071
7172Fetch all the sources required to build the fully statically linked Linux
7273SDK for Swift. Options are:
@@ -82,6 +83,10 @@ SDK for Swift. Options are:
8283 select a scheme or tag; otherwise it will be treated as
8384 a version number.
8485 --boringssl-version <version>
86+ --github-comment <comment>
87+ GitHub PR comment body to pass to update-checkout via
88+ --github-comment, used to select specific repos to check
89+ out from a pull request comment.
8590EOF
8691}
8792
@@ -94,6 +99,7 @@ if [[ -z "${BORINGSSL_VERSION}" ]]; then
9499fi
95100
96101clone_with_ssh=false
102+ github_comment=" "
97103while [ " $# " -gt 0 ]; do
98104 case " $1 " in
99105 --swift-scheme)
@@ -108,6 +114,8 @@ while [ "$#" -gt 0 ]; do
108114 clone_with_ssh=true ;;
109115 --source-dir)
110116 source_dir=" $2 " ; shift ;;
117+ --github-comment)
118+ github_comment=" $2 " ; shift ;;
111119 * )
112120 usage; exit 0 ;;
113121 esac
@@ -142,13 +150,16 @@ cd swift
142150# Get its dependencies
143151header " Fetching Swift Dependencies"
144152
145- extra_args=" --skip-history --all-repositories"
153+ extra_args=(--skip-history --all-repositories)
154+ if [[ -n " $github_comment " ]]; then
155+ extra_args+=(--github-comment " $github_comment " )
156+ fi
146157if [[ $SWIFT_VERSION == scheme:* ]]; then
147- utils/update-checkout ${clone_arg} --scheme ${SWIFT_VERSION# scheme: } ${extra_args}
158+ utils/update-checkout ${clone_arg} --scheme ${SWIFT_VERSION# scheme: } " ${extra_args[@]} "
148159elif [[ $SWIFT_VERSION == tag:* ]]; then
149- utils/update-checkout ${clone_arg} --tag ${SWIFT_VERSION# tag: } ${extra_args}
160+ utils/update-checkout ${clone_arg} --tag ${SWIFT_VERSION# tag: } " ${extra_args[@]} "
150161else
151- utils/update-checkout ${clone_arg} --tag swift-${SWIFT_VERSION} -RELEASE ${extra_args}
162+ utils/update-checkout ${clone_arg} --tag swift-${SWIFT_VERSION} -RELEASE " ${extra_args[@]} "
152163fi
153164
154165popd > /dev/null
0 commit comments