We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b4f4a commit 1cffcc3Copy full SHA for 1cffcc3
release.sh
@@ -78,10 +78,16 @@ if [[ "$CODE_CHANGED" == true ]]; then
78
fi
79
80
# Insert the new changelog entry below the line "== Changelog =="
81
-# Use sed to insert the changelog entry
82
-sed -i "/== Changelog ==/a \\
83
-\\
84
-$CHANGELOG_ENTRY" ./readme.txt
+# Create a temporary file with the new content
+ESCAPED_CHANGELOG_ENTRY=$(echo "$CHANGELOG_ENTRY" | sed 's/[\/&*]/\\&/g')
+awk -v entry="$ESCAPED_CHANGELOG_ENTRY" '
+/== Changelog ==/ {
85
+ print $0
86
+ print ""
87
+ print entry
88
+ next
89
+}
90
+{ print }' readme.txt > readme.txt.tmp && mv readme.txt.tmp readme.txt
91
92
# Update the config.json file
93
echo "{
0 commit comments