-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #364 from JrGoodle/checkout
Add `clowder checkout` command
- Loading branch information
Showing
12 changed files
with
178 additions
and
4 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
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
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
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
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,71 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1 | ||
|
||
. test_utilities.sh | ||
|
||
export cats_projects=( 'duke' 'mu' ) | ||
|
||
export black_cats_projects=( 'black-cats/kit' \ | ||
'black-cats/kishka' \ | ||
'black-cats/sasha' \ | ||
'black-cats/jules' ) | ||
|
||
export all_projects=( 'mu' 'duke' \ | ||
'black-cats/kit' \ | ||
'black-cats/kishka' \ | ||
'black-cats/sasha' \ | ||
'black-cats/jules' ) | ||
|
||
test_cats_default_herd_branches() { | ||
echo "TEST: cats projects on default branches" | ||
for project in "${black_cats_projects[@]}"; do | ||
pushd $project || exit 1 | ||
test_branch master | ||
popd || exit 1 | ||
done | ||
pushd mu || exit 1 | ||
test_branch knead | ||
popd || exit 1 | ||
pushd duke || exit 1 | ||
test_branch purr | ||
popd || exit 1 | ||
} | ||
|
||
print_double_separator | ||
echo "TEST: Test clowder checkout" | ||
|
||
cd "$CATS_EXAMPLE_DIR" || exit 1 | ||
./clean.sh | ||
./init.sh | ||
|
||
test_checkout() { | ||
print_single_separator | ||
echo "TEST: Check projects are on correct branches" | ||
clowder herd $PARALLEL || exit 1 | ||
local branch='checkout_branch' | ||
|
||
pushd duke || exit 1 | ||
git branch $branch || exit 1 | ||
popd || exit 1 | ||
pushd mu || exit 1 | ||
git branch $branch || exit 1 | ||
popd || exit 1 | ||
|
||
test_cats_default_herd_branches | ||
|
||
clowder checkout $branch || exit 1 | ||
|
||
pushd duke || exit 1 | ||
test_branch $branch || exit 1 | ||
popd || exit 1 | ||
pushd mu || exit 1 | ||
test_branch $branch || exit 1 | ||
popd || exit 1 | ||
for project in "${black_cats_projects[@]}"; do | ||
pushd $project || exit 1 | ||
test_branch master | ||
popd || exit 1 | ||
done | ||
} | ||
test_checkout |
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