Skip to content

Commit 7edd392

Browse files
committed
Uniqueness test
1 parent 503bdc4 commit 7edd392

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

admin/release

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,19 @@ git checkout -b $branch
5656
# Update version dependencies
5757
echo -e "${BOLD}Updating version dependencies${NORMAL}"
5858

59-
function check_unique (pattern, sourcefile) {
60-
count=`grep -o $1 < $2 | wc -l`
61-
if [ count -ne 1 ]; then
59+
function check_unique {
60+
count=`grep -c $1 < $2 | wc -l`
61+
if [ $count -ne 1 ]; then
6262
echo "${BOLD}${COLOR}$2 has more than 1 occurence 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"
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
6972

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

0 commit comments

Comments
 (0)