Skip to content

Commit

Permalink
Merge pull request #478 from JrGoodle/optional-path
Browse files Browse the repository at this point in the history
Infer path from project name if not specified
  • Loading branch information
JrGoodle committed May 13, 2020
2 parents d56e739 + ff82447 commit 63be79f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/cats/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ rm -rf .clowder
rm -rf black-cats
rm -rf duke
rm -rf mu
rm -rf jrgoodle
rm -f clowder.yaml
2 changes: 1 addition & 1 deletion src/clowder/model/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, project: dict, defaults: Defaults, sources: List[Source]):
"""

self.name = project['name']
self.path = project['path']
self.path = project.get('path', self.name)
self.ref = project.get('ref', defaults.ref)
self.remote = project.get('remote', defaults.remote)
self.depth = project.get('depth', defaults.depth)
Expand Down
29 changes: 29 additions & 0 deletions test/scripts/cats/herd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@ test_herd_missing_clowder
./clean.sh
./init.sh || exit 1

test_herd_implicit_project_paths() {
print_single_separator
echo "TEST: Check projects are on correct branches"
$COMMAND link -v implicit-paths || exit 1
$COMMAND herd $PARALLEL || exit 1
pushd jrgoodle/mu || exit 1
test_branch knead
popd || exit 1
pushd jrgoodle/duke || exit 1
test_branch purr
popd || exit 1
pushd jrgoodle/kit || exit 1
test_branch master
popd || exit 1
pushd jrgoodle/kishka || exit 1
test_branch master
popd || exit 1
pushd jrgoodle/sasha || exit 1
test_branch master
popd || exit 1
pushd jrgoodle/june || exit 1
test_branch master
popd || exit 1
}
test_herd_implicit_project_paths

./clean.sh
./init.sh || exit 1

test_herd() {
print_single_separator
echo "TEST: Check projects are on correct branches"
Expand Down

0 comments on commit 63be79f

Please sign in to comment.