Skip to content

Commit 8952580

Browse files
committed
Tweaking uniqueness test
1 parent 7edd392 commit 8952580

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

admin/release

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ git checkout -b $branch
5757
echo -e "${BOLD}Updating version dependencies${NORMAL}"
5858

5959
function check_unique {
60-
count=`grep -c $1 < $2 | wc -l`
60+
count=`grep -c '$1' < $2 | wc -l`
6161
if [ $count -ne 1 ]; then
62-
echo "${BOLD}${COLOR}$2 has more than 1 occurence of '$1'${NORMAL}"
62+
echo "${BOLD}${COLOR}$2 has ${count} occurences of '$1'${NORMAL}"
6363
exit 1
6464
fi
6565
}
6666

6767
# Make sure there is only one line to affect in each file
68-
check_unique "const CI_VERSION" system/CodeIgniter.php
69-
check_unique "release =" user_guide_src/source/conf.py
70-
check_unique "|release|" user_guide_src/source/changelog.rst
71-
check_unique "Release Date.*Not Released" user_guide_src/source/changelog.rst
68+
check_unique "const CI_VERSION" 'system/CodeIgniter.php'
69+
check_unique "release =" 'user_guide_src/source/conf.py'
70+
check_unique "|release|" 'user_guide_src/source/changelog.rst'
71+
check_unique "Release Date.*Not Released" 'user_guide_src/source/changelog.rst'
7272

7373
# CI_VERSION definition in system/CodeIgniter.php
7474
sed -i "/const CI_VERSION/s/'.*'/'${version}${qualifier}'/" system/CodeIgniter.php

0 commit comments

Comments
 (0)