aboutsummaryrefslogtreecommitdiffstats
path: root/test/tests/filter-directory-prune-tags.success
blob: b4c695fe0244baa17b47749ab00b34abd3b068b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

. "$(cd -- "$(dirname -- "${0}")" && pwd -P)/../bootstrap"

initializeRepositories

"${BIN_MAIN}" ${BIN_MAIN_OPTIONS} --workdir "${DIR_TEMP}" --branch-whitelist 'master' -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}"

echo 'Fetching initial tags'
actualTags="$(getTagList "${DIR_DESTINATION}")"
expectedTags='tag-02'
if test "${actualTags}" != "${expectedTags}"
then
	printf 'Expected tags: %s\nResulting tags: %s\n' "${expectedTags}" "${actualTags}">&2
	exit 1
fi

"${BIN_MAIN}" ${BIN_MAIN_OPTIONS} --workdir "${DIR_TEMP}" --branch-whitelist 'master' --prune-tags --tag-blacklist 'rx:tag-.*' -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}"

echo 'Fetching final tags'
actualTags="$(getTagList "${DIR_DESTINATION}")"
expectedTags=''
if test "${actualTags}" != "${expectedTags}"
then
	printf 'Expected tags: %s\nResulting tags: %s\n' "${expectedTags}" "${actualTags}">&2
	exit 1
fi

© 2014-2024 Faster IT GmbH | imprint | privacy policy