feat: diff on release flow

Also, don't commit unstaged files.
This commit is contained in:
2023-10-15 13:39:04 +02:00
parent f96bf9a8ac
commit 7f7f7224c6
8 changed files with 107 additions and 38 deletions

View File

@ -84,3 +84,22 @@ setup(){
_reset_recipe "$TEST_RECIPE"
}
@test "unknown files not committed" {
run $ABRA recipe upgrade "$TEST_RECIPE" --no-input --patch
assert_success
run bash -c 'echo "unstaged changes" >> "$ABRA_DIR/recipes/$TEST_RECIPE/foo"'
assert_success
assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
run $ABRA recipe release "$TEST_RECIPE" --no-input --patch
assert_success
assert_output --partial 'no -p/--publish passed, not publishing'
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rm foo
assert_failure
assert_output --partial "fatal: pathspec 'foo' did not match any files"
_reset_recipe
}