-# Copyright (c) 2018.3020 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2018-2020 Samsung Electronics Co., Ltd All Rights Reserved
#
# This file is licensed under the terms of MIT License or the Apache License
# Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
CURRENT_MAJOR=($(cat packaging/cynara.spec | grep Version | awk -F ":" '{print $2}' | awk -F "." '{print $2}'))
CURRENT_MINOR=($(cat packaging/cynara.spec | grep Version | awk -F ":" '{print $2}' | awk -F "." '{print $3}'))
CURRENT_VERSION="$CURRENT_MAJOR.$CURRENT_MINOR"
+CURRENT_VERSION_ESCAPED="$CURRENT_MAJOR\.$CURRENT_MINOR"
# A POSIX variable
OPTIND=1 # Reset in case getopts has been used previously in the shell.
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Updating CMakeLists.txt files..."
- find . -name "CMakeLists.txt" -type f -print0 | xargs -0 sed -i "s/${CURRENT_VERSION}/${NEW_VERSION}/g"
+ find . -name "CMakeLists.txt" -type f -print0 | xargs -0 sed -i "s/${CURRENT_VERSION_ESCAPED}/${NEW_VERSION}/g"
echo "Updating spec files..."
- find . -name "*.spec" -type f -print0 | xargs -0 sed -i "s/${CURRENT_VERSION}/${NEW_VERSION}/g"
+ find . -name "*.spec" -type f -print0 | xargs -0 sed -i "s/${CURRENT_VERSION_ESCAPED}/${NEW_VERSION}/g"
echo "Checking left files..."
- left_files=($(git grep "${CURRENT_VERSION}" | awk -F ":" '{print $1}' | sort -u))
+ left_files=($(git grep "${CURRENT_VERSION_ESCAPED}" | awk -F ":" '{print $1}' | sort -u))
CHANGELOG_FILE="changelog"
if [ ${#left_files[*]} -ne 1 ]
echo "Updating changelog..."
- RELEASE_COMMIT=`git log --pretty=oneline --abbrev-commit | grep "Release.*${CURRENT_VERSION}" | awk {'print $1'}`
+ RELEASE_COMMIT=`git log --pretty=oneline --abbrev-commit | grep "Release.*${CURRENT_VERSION_ESCAPED}" | awk {'print $1'}`
IFS=$'\n'
COMMIT_LIST=($(git log --pretty=oneline --abbrev-commit ${RELEASE_COMMIT}..HEAD | awk {'first = $1; $1=""; print $0'}|sed 's/^ //g'))
#COMMIT_LIST=`git log --pretty=oneline --abbrev-commit ${RELEASE_COMMIT}..HEAD | awk {'first = $1; $1=""; print $0'}|sed 's/^ //g'`
-# Copyright (c) 2018.3020 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2018-2020 Samsung Electronics Co., Ltd All Rights Reserved
#
# This file is licensed under the terms of MIT License or the Apache License
# Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.