1
1
mirror of https://github.com/orhun/git-cliff.git synced 2025-01-07 15:48:56 +03:00
git-cliff/.github/fixtures/test-fixtures-locally.sh
Kenji Miyake 3ccec7f93a
fix(changelog): use root commit when --latest and there is only one tag (#59)
* test: add a test for --latest with one tag

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore: add a test script

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix: use root commit when --latest and there is only one tag

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs: remove "requires at least 2 tags"

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* add newlines

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* apply review to test-fixtures-locally.sh

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* apply review to lib.rs

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore(fixtures): apply shellcheck suggestion

* chore(ci): checkout pull request HEAD commit

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-02-20 17:26:11 +03:00

23 lines
429 B
Bash
Executable File

#!/usr/bin/env bash
set -e
SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
if [ -z "$1" ]; then
echo "Please input a fixture name."
exit 1
fi
export FIXTURES_DIR="$SCRIPT_DIR/$1"
# Set up a temporary repository
cd "$(mktemp -d)"
git init
# Commit
"$FIXTURES_DIR/commit.sh"
# Show results
echo -e "\n---Run git-cliff---"
cargo run --manifest-path "$SCRIPT_DIR/../../Cargo.toml" -- --config "$FIXTURES_DIR/cliff.toml" $2