decentral1se 316fdd3643
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
fix: abra app new checks out latest version
See coop-cloud/organising#618
2024-06-21 15:51:34 +02:00

46 lines
1.2 KiB
Bash

#!/usr/bin/env bash
_checkout_recipe() {
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout .
assert_success
}
_remove_tags(){
run bash -c 'git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -l | wc -l'
assert_success
refute_output '0'
run bash -c 'git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -l | \
xargs -I{} git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -d {}'
assert_success
assert_output --partial 'Deleted tag'
run bash -c 'git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -l | wc -l'
assert_success
assert_output '0'
}
_reset_tags() {
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" fetch --all
assert_success
run bash -c 'git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -l | wc -l'
assert_success
refute_output '0'
}
_set_git_author() {
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" config --local user.email test@example.com
assert_success
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" config --local user.name test
assert_success
}
_latest_tag() {
export LATEST_TAG=$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" describe --abbrev=0)
}
_latest_hash() {
export LATEST_HASH=$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" log -1 --pretty=format:%h)
}