github.com/xsb/terraform@v0.6.13-0.20160314145438-fe415c2f09d7/scripts/changelog-links.sh (about) 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 SCRIPT_DIR=$(dirname "$(readlink -f "$0")") 14 15 cd "$SCRIPT_DIR/.." 16 sed -ri 's/\[GH-([0-9]+)\]/\(\[#\1\]\(https:\/\/github.com\/hashicorp\/terraform\/issues\/\1\)\)/' CHANGELOG.md