Skip to content

Commit

Permalink
Auto Release Cleanup: Update Docs on Release (#419)
Browse files Browse the repository at this point in the history
* update docs on release

* more specific doc commit

Co-authored-by: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com>

Co-authored-by: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com>
  • Loading branch information
itsjaspermilan and bcmdarroch committed Nov 22, 2022
1 parent e8b99ca commit 127684c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/419.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Automatically update docs on auto release
```
7 changes: 7 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ jobs:
rm -f OLD-CHANGELOG.md
git add CHANGELOG.md
git commit -m 'updated CHANGELOG.md'
echo "updating documentation"
CURRENT_VERSION_NUM="${CURRENT_VERSION:1}"
NEW_VERSION_NUM="${NEW_VERSION:1}"
sed -i "s/~> $CURRENT_VERSION_NUM/~> $NEW_VERSION_NUM/g" examples/provider/provider.tf
go generate
git add examples/provider/provider.tf docs/index.md
git commit -m 'updated documentation'
echo "creating a new git tag"
CHANGELOG_URL="https://github.com/hashicorp/terraform-provider-hcp/blob/${NEW_VERSION}/CHANGELOG.md"
git tag -a -m "${NEW_VERSION}" -m "See changelog: ${CHANGELOG_URL}" "${NEW_VERSION}"
Expand Down

0 comments on commit 127684c

Please sign in to comment.