Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true

- name: Install validation tools (macOS)
if: runner.os == 'macOS'
Expand Down
9 changes: 6 additions & 3 deletions tests/release.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ setup() {

cat >"$RELEASE_GIT_STUB" <<'EOF'
#!/usr/bin/env bash
if [[ "${BASE_BASH_RELEASE_TEST_LOCAL_TAG:-}" == present && "$*" == *"show-ref --verify --quiet refs/tags/"* ]]; then
exit 0
if [[ "$*" == *"show-ref --verify --quiet refs/tags/"* ]]; then
if [[ "${BASE_BASH_RELEASE_TEST_LOCAL_TAG:-}" == present ]]; then
exit 0
fi
exit 1
fi
if [[ "$*" == *"ls-remote --tags origin refs/tags/"* ]]; then
if [[ "${BASE_BASH_RELEASE_TEST_REMOTE_STATUS:-ok}" == error ]]; then
exit 2
fi
if [[ "${BASE_BASH_RELEASE_TEST_REMOTE_TAG:-}" == present ]]; then
printf 'deadbeef refs/tags/v2.0.0\n'
printf 'deadbeef refs/tags/%s\n' "${*##*refs/tags/}"
fi
exit 0
fi
Expand Down
Loading