Skip to content

Commit 0948831

Browse files
committed
Script: Fix =~ bug
1 parent ec8eb99 commit 0948831

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,16 @@ jobs:
182182
if [ -f ${{github.workspace}}/Script/common.sh ]; then
183183
source ${{github.workspace}}/Script/common.sh
184184
185-
content=$(<${{github.workspace}}/ChangeLog.md)
186-
if [[ $content =~ ${{env.RabbitRemoteControl_VERSION}} ]]; then
185+
content=$(<"${{github.workspace}}/ChangeLog.md")
186+
if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
187187
echo "## :us: Change log" >> ${{github.workspace}}/Release.md
188188
echo "" >> ${{github.workspace}}/Release.md
189189
get_section ${{github.workspace}}/ChangeLog.md >> ${{github.workspace}}/Release.md
190190
echo "" >> ${{github.workspace}}/Release.md
191191
fi
192192
193-
# content=$(<${{github.workspace}}/ChangeLog_zh_CN.md)
194-
# if [[ $content =~ ${{env.RabbitRemoteControl_VERSION}} ]]; then
193+
# content=$(<"${{github.workspace}}/ChangeLog_zh_CN.md")
194+
# if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
195195
# echo "## :cn: 修改日志" >> ${{github.workspace}}/Release.md
196196
# echo "" >> ${{github.workspace}}/Release.md
197197
# get_section ${{github.workspace}}/ChangeLog_zh_CN.md >> ${{github.workspace}}/Release.md
@@ -219,8 +219,8 @@ jobs:
219219
if [ -f ${{github.workspace}}/Script/common.sh ]; then
220220
source ${{github.workspace}}/Script/common.sh
221221
222-
content=$(<${{github.workspace}}/ChangeLog.md)
223-
if [[ $content =~ ${{env.RabbitRemoteControl_VERSION}} ]]; then
222+
content=$(<"${{github.workspace}}/ChangeLog.md")
223+
if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
224224
echo "## :us: Change log" >> ${{github.workspace}}/Release.md
225225
echo "" >> ${{github.workspace}}/Release.md
226226
get_section ${{github.workspace}}/ChangeLog.md >> ${{github.workspace}}/Release.md

deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,13 @@ parse_with_getopts() {
347347
check_chang_log() {
348348
echo " - Modified change log ?"
349349
local content=$(<${SOURCE_DIR}/ChangeLog.md)
350-
if [[ $content =~ $VERSION ]]; then
350+
if [[ $content =~ "$VERSION" ]]; then
351351
echo_success " √ Modified in \"ChangeLog.md\""
352352
else
353353
echo_warn " ! Warning: Don't include \"$VERSION\" in the file \"ChangeLog.md\""
354354
fi
355355
content=$(<${SOURCE_DIR}/ChangeLog_zh_CN.md)
356-
if [[ $content =~ $VERSION ]]; then
356+
if [[ $content =~ "$VERSION" ]]; then
357357
echo_success " √ Modified in \"ChangeLog_zh_CN.md\""
358358
else
359359
echo_warn " ! Warning: Don't include \"$VERSION\" in the file \"ChangeLog_zh_CN.md\""

0 commit comments

Comments
 (0)