diff options
Diffstat (limited to 'scripts/changelog-links.sh')
-rwxr-xr-x | scripts/changelog-links.sh | 20 |
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 @@ | |||
11 | set -e | 11 | set -e |
12 | 12 | ||
13 | if [[ ! -f CHANGELOG.md ]]; then | 13 | if [[ ! -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 |
17 | fi | 17 | fi |
18 | 18 | ||
19 | if [[ `uname` == "Darwin" ]]; then | 19 | if [[ $(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" |
22 | else | 22 | else |
23 | echo "Using GNU sed" | 23 | echo "Using GNU sed" |
24 | SED="sed -i.bak -r -e" | 24 | SED="sed -i.bak -r -e" |
25 | fi | 25 | fi |
26 | 26 | ||
27 | PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-statuscake\/issues" | 27 | PROVIDER_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 | ||
31 | rm CHANGELOG.md.bak | 31 | rm CHANGELOG.md.bak |