Skip to content

Commit 7709d66

Browse files
committed
Merge branch 'RM-3355_fix_bats_tests_version_checking' into 'master'
RM-3355: fix version checking from bats tests See merge request cdoc2/cdoc2-java-ref-impl!17
2 parents d017366 + 54f2705 commit 7709d66

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

prepare_release.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
GIT_BRANCH=$(git branch --show-current)
44

55
if [[ "master" != "$GIT_BRANCH" ]]; then
6-
echo "Not on 'master' branch. You have 5 seconds to abort, before script will continue"
6+
echo "Release will be made from branch $GIT_BRANCH."
77
sleep 5
88
fi
99

1010

11-
#if [[ -n $(git cherry -v) ]]; then
12-
# echo "Detected unpushed commits. Exit"
13-
# exit 1
14-
#fi
15-
#
16-
#if [[ -n $(git status --porcelain --untracked-files=no) ]]; then
17-
# echo "Uncommited changes detected. Exit"
18-
# exit 1
19-
#fi
11+
if [[ -n $(git cherry -v) ]]; then
12+
echo "Detected unpushed commits. Exit"
13+
exit 1
14+
fi
15+
16+
if [[ -n $(git status --porcelain --untracked-files=no) ]]; then
17+
echo "Uncommitted changes detected. Exit"
18+
exit 1
19+
fi
2020

2121
while getopts "v:" opt; do
2222
case $opt in

test/bats/cdoc2_tests.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ run_alias() {
4444
@test "CDOC2 version is found" {
4545
run echo $CDOC2_VER
4646
echo "# $CDOC2_VER">&3
47-
assert_output --partial 'SNAPSHOT'
47+
assert_output --regexp '^[0-9]+\.[0-9]+\.[0-9].*$'
4848
}
4949

5050
@test "preparing: assert BATS_HOME value exists" {

0 commit comments

Comments
 (0)