Skip to content

Commit

Permalink
Added additional scripts for provider integration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbroden84 committed Jun 8, 2020
1 parent fd20c16 commit 65f085c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
31 changes: 31 additions & 0 deletions scripts/changelog-links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to
# be Markdown links to the given github issues.
#
# This is run during releases so that the issue references in all of the
# released items are presented as clickable links, but we can just use the
# easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section
# while merging things between releases.

set -e

if [[ ! -f CHANGELOG.md ]]; then
echo "ERROR: CHANGELOG.md not found in pwd."
echo "Please run this from the root of the terraform provider repository"
exit 1
fi

if [[ `uname` == "Darwin" ]]; then
echo "Using BSD sed"
SED="sed -i.bak -E -e"
else
echo "Using GNU sed"
SED="sed -i.bak -r -e"
fi

PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-cloudamqp\/issues"

$SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md

rm CHANGELOG.md.bak
10 changes: 10 additions & 0 deletions scripts/gogetcookie.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

touch ~/.gitcookies
chmod 0600 ~/.gitcookies

git config --global http.cookiefile ~/.gitcookies

tr , \\t <<\__END__ >>~/.gitcookies
.googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE
__END__

0 comments on commit 65f085c

Please sign in to comment.