Skip to content

Commit

Permalink
Merge pull request #168 from krishicks/fix-annotate-file-path
Browse files Browse the repository at this point in the history
Fix annotate file path
  • Loading branch information
vito authored Jan 20, 2018
2 parents 93e292d + b21ca15 commit 94a5f1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ if [ -n "$tag" ] && [ ! -f "$tag" ]; then
exit 1
fi

if [ -n "$annotation_file" ] && [ ! -f $annotation_file ]; then
echo "annotation file '$annotation_file' does not exist"
exit 1
fi

forceflag=""
if [ $force = "true" ]; then
forceflag="--force"
Expand All @@ -81,7 +86,7 @@ fi

annotate=""
if [ -n "$annotation_file" ]; then
annotate=" -a -F $annotation_file"
annotate=" -a -F $source/$annotation_file"
fi

cd $repository
Expand Down
7 changes: 4 additions & 3 deletions test/put.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ it_can_put_to_url_with_tag_and_annotation() {

local ref=$(make_commit $repo2)

echo 1.0 > $src/some-tag-file
echo yay > $src/some-annotation-file
mkdir -p $src/tag
echo 1.0 > $src/tag/some-tag-file
echo yay > $src/tag/some-annotation-file

# cannot push to repo while it's checked out to a branch
git -C $repo1 checkout refs/heads/master

put_uri_with_tag_and_annotation $repo1 $src "$src/some-tag-file" "$src/some-annotation-file" repo | jq -e "
put_uri_with_tag_and_annotation $repo1 $src "tag/some-tag-file" "tag/some-annotation-file" repo | jq -e "
.version == {ref: $(echo $ref | jq -R .)}
"

Expand Down

0 comments on commit 94a5f1e

Please sign in to comment.