Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(development env): unified the DinD development environment (#33)
* chore(development env): unified the DinD development environment * export dashboard's svc as cluster service * ignore data directory * mount a host directory as registry storage directory * write bind mount info to /etc/fstab * Wait for the all apps to be ready * bump local-volume-provisioner version to v2.2.0 * set the retry time to 600 * add a script for checkout a tidb-operator PR branch in a forked repo
- Loading branch information
onlymellb
committed
Aug 21, 2018
1 parent
3a230d2
commit 5598b81
Showing
7 changed files
with
2,228 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to checkout a tidb-operator PR branch in a forked repo. | ||
if [[ -z ${1:-} ]]; then | ||
echo "\ | ||
This script is used to checkout a tidb-operator PR branch in a forked repo | ||
Usage: | ||
checkout-pr-branch.sh [github-username]:[pr-branch] | ||
The argument can be copied directly from github PR page. | ||
The local branch name would be [github-username]/[pr-branch].\ | ||
" >&2 | ||
exit | ||
fi | ||
|
||
username=$(echo ${1} | cut -d':' -f1) | ||
branch=$(echo ${1} | cut -d':' -f2) | ||
local_branch=${username}/${branch} | ||
fork="https://github.com/${username}/tidb-operator" | ||
|
||
exists=`git show-ref refs/heads/${local_branch}` | ||
if [[ -n ${exists} ]]; then | ||
git checkout ${local_branch} | ||
git pull ${fork} ${branch}:${local_branch} | ||
else | ||
git fetch ${fork} ${branch}:${local_branch} | ||
git checkout ${local_branch} | ||
fi |
Oops, something went wrong.