File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,15 @@ ENVIRONMENT VARIABLES:
49
49
If not set, the script will clone it from GitHub.
50
50
Example: QUICKSTART_REPO=/path/to/quickstart-ios $( basename " $0 " ) authentication
51
51
52
+ QUICKSTART_BRANCH: Optional. The branch to checkout in the quickstart repo.
53
+ Defaults to the repo's default branch.
54
+ Example: QUICKSTART_BRANCH=my-feature-branch $( basename " $0 " ) authentication
55
+
52
56
BYPASS_SECRET_CHECK: Optional. Set to "true" to bypass the CI secret check for local runs.
53
57
Example: BYPASS_SECRET_CHECK=true $( basename " $0 " ) authentication
58
+
59
+ DEBUG: Optional. Set to "true" to enable shell trace mode (` set -x` ).
60
+ Example: DEBUG=true $( basename " $0 " ) authentication
54
61
EOF
55
62
}
56
63
@@ -93,6 +100,17 @@ setup_quickstart_repo() {
93
100
git sparse-checkout set " ${sample_name} " config
94
101
)
95
102
fi
103
+
104
+ # If a branch is specified, check it out.
105
+ if [[ -n " ${QUICKSTART_BRANCH:- } " ]]; then
106
+ echo " Checking out quickstart branch: ${QUICKSTART_BRANCH} " >&2
107
+ (
108
+ cd " ${quickstart_dir} "
109
+ git fetch
110
+ git checkout " ${QUICKSTART_BRANCH} "
111
+ )
112
+ fi
113
+
96
114
# Return the absolute path to the quickstart directory.
97
115
(cd " $quickstart_dir " && pwd)
98
116
}
You can’t perform that action at this time.
0 commit comments