diff options
author | alexandreFre <51956137+alexandreFre@users.noreply.github.com> | 2019-07-04 14:32:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-04 14:32:15 +0200 |
commit | 80e82d1365343acdd54bca9e1c94dfe03b913600 (patch) | |
tree | a87cc028eda54bd95b248296e331c71a4ad74241 /scripts | |
parent | 4509938b5f377136215645157376bf75e3980418 (diff) | |
parent | a1f9b9a1c1a80ee4db8de66fe1b771fe8e28cd05 (diff) | |
download | terraform-provider-mailgun-80e82d1365343acdd54bca9e1c94dfe03b913600.tar.gz terraform-provider-mailgun-80e82d1365343acdd54bca9e1c94dfe03b913600.tar.zst terraform-provider-mailgun-80e82d1365343acdd54bca9e1c94dfe03b913600.zip |
Merge pull request #6 from alexandreFre/add_doc
Add doc
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/changelog-links.sh | 31 | ||||
-rwxr-xr-x | scripts/gogetcookie.sh | 10 |
2 files changed, 41 insertions, 0 deletions
diff --git a/scripts/changelog-links.sh b/scripts/changelog-links.sh new file mode 100755 index 0000000..303341b --- /dev/null +++ b/scripts/changelog-links.sh | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to | ||
4 | # be Markdown links to the given github issues. | ||
5 | # | ||
6 | # This is run during releases so that the issue references in all of the | ||
7 | # released items are presented as clickable links, but we can just use the | ||
8 | # easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section | ||
9 | # while merging things between releases. | ||
10 | |||
11 | set -e | ||
12 | |||
13 | if [[ ! -f CHANGELOG.md ]]; then | ||
14 | echo "ERROR: CHANGELOG.md not found in pwd." | ||
15 | echo "Please run this from the root of the terraform provider repository" | ||
16 | exit 1 | ||
17 | fi | ||
18 | |||
19 | if [[ `uname` == "Darwin" ]]; then | ||
20 | echo "Using BSD sed" | ||
21 | SED="sed -i.bak -E -e" | ||
22 | else | ||
23 | echo "Using GNU sed" | ||
24 | SED="sed -i.bak -r -e" | ||
25 | fi | ||
26 | |||
27 | PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-statuscake\/issues" | ||
28 | |||
29 | $SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md | ||
30 | |||
31 | rm CHANGELOG.md.bak | ||
diff --git a/scripts/gogetcookie.sh b/scripts/gogetcookie.sh new file mode 100755 index 0000000..26c63a6 --- /dev/null +++ b/scripts/gogetcookie.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | touch ~/.gitcookies | ||
4 | chmod 0600 ~/.gitcookies | ||
5 | |||
6 | git config --global http.cookiefile ~/.gitcookies | ||
7 | |||
8 | tr , \\t <<\__END__ >>~/.gitcookies | ||
9 | .googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE | ||
10 | __END__ | ||