aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/changelog-links.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/changelog-links.sh')
-rwxr-xr-xscripts/changelog-links.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/changelog-links.sh b/scripts/changelog-links.sh
index 303341b..83e918e 100755
--- a/scripts/changelog-links.sh
+++ b/scripts/changelog-links.sh
@@ -11,21 +11,21 @@
11set -e 11set -e
12 12
13if [[ ! -f CHANGELOG.md ]]; then 13if [[ ! -f CHANGELOG.md ]]; then
14 echo "ERROR: CHANGELOG.md not found in pwd." 14 echo "ERROR: CHANGELOG.md not found in pwd."
15 echo "Please run this from the root of the terraform provider repository" 15 echo "Please run this from the root of the terraform provider repository"
16 exit 1 16 exit 1
17fi 17fi
18 18
19if [[ `uname` == "Darwin" ]]; then 19if [[ $(uname) == "Darwin" ]]; then
20 echo "Using BSD sed" 20 echo "Using BSD sed"
21 SED="sed -i.bak -E -e" 21 SED="sed -i.bak -E -e"
22else 22else
23 echo "Using GNU sed" 23 echo "Using GNU sed"
24 SED="sed -i.bak -r -e" 24 SED="sed -i.bak -r -e"
25fi 25fi
26 26
27PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-statuscake\/issues" 27PROVIDER_URL="https:\\/\\/github.com\\/terraform-providers\\/terraform-provider-statuscake\\/issues"
28 28
29$SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md 29$SED "s/GH-([0-9]+)/\\[#\\1\\]\\($PROVIDER_URL\\/\\1\\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md
30 30
31rm CHANGELOG.md.bak 31rm CHANGELOG.md.bak