-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andrew Dye <[email protected]>
- Loading branch information
1 parent
6279544
commit 2a2f78f
Showing
1 changed file
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo "Missing tag or sha to pull, i.e., v1.10.7" | ||
exit 1 | ||
fi | ||
|
||
REMOTE_REF=$1 | ||
|
||
ret=0 | ||
git remote show upstream > /dev/null 2>&1 || ret=$? | ||
if [[ $ret != 0 ]]; then | ||
echo "Adding upstream remote" | ||
git remote add upstream https://github.com/flyteorg/flyte.git | ||
fi | ||
|
||
git fetch upstream | ||
|
||
ret=0 | ||
git show-ref -q "${REMOTE_REF}" || ret=$? | ||
if [[ $ret != 0 ]]; then | ||
echo "Couldn't find ${REMOTE_REF} in upstream. Exiting." | ||
exit 1 | ||
fi | ||
|
||
git checkout -b "flyte-${REMOTE_REF}" | ||
git pull upstream "${REMOTE_REF}" | ||
|
||
echo "Successfully pulled ${REMOTE_REF} from upstream" |