Skip to content

Commit

Permalink
Merge pull request #20 from khos2ow/rename-master
Browse files Browse the repository at this point in the history
Rename official branch to 'main'
  • Loading branch information
khos2ow authored Jan 14, 2021
2 parents d1ab5ef + 8eee17b commit 56ddcc7
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/templates/README.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "escape_chars" }}{{ . | strings.ReplaceAll "_" "\\_" | strings.ReplaceAll "|" "\\|" | strings.ReplaceAll "*" "\\*" }}{{- end }}
{{- define "sanatize_string" }}{{ . | strings.ReplaceAll "\n\n" "<br><br>" | strings.ReplaceAll " \n" "<br>" | strings.ReplaceAll "\n" "<br>" | tmpl.Exec "escape_chars" }}{{- end }}
{{- $action := (datasource "action") -}}{{- $version := or (getenv "VERSION") "master" -}}
{{- $action := (datasource "action") -}}{{- $version := or (getenv "VERSION") "main" -}}
# {{ $action.name }}

{{ $action.description }}
Expand All @@ -14,8 +14,8 @@ branch.
`{{ $version }}` (uses [terraform-docs] v0.10.1, which is supported and tested on Terraform version
0.11+ and 0.12+ but may work for others.)

{{- if eq $version "master" }}
| WARNING: You should not rely on master being stable or to have accurate documentation. Please use a git tagged semver or major version tag like `v1`. |
{{- if eq $version "main" }}
| WARNING: You should not rely on main being stable or to have accurate documentation. Please use a git tagged semver or major version tag like `v1`. |
| --- |
{{- end }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build
on:
push:
branches-ignore:
- master
- main
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Drafter
on:
push:
branches:
- master
- main
jobs:
update_release_draft:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Validate
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

These examples are committed with the documentation rendered just like a normal
repo would. They are generated using this github action on each build of the code.
Which you can find [here](https://github.com/terraform-docs/gh-actions/tree/master/.github/workflows/build.yml).
Which you can find [here](https://github.com/terraform-docs/gh-actions/tree/main/.github/workflows/build.yml).
6 changes: 3 additions & 3 deletions scripts/pre-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ fi

CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [[ "${CURRENT_BRANCH}" == "master" ]]; then
git pull origin master
if [[ "${CURRENT_BRANCH}" == "main" ]]; then
git pull origin main
git checkout -b "release/${NEW_VERSION}"
elif [[ "${CURRENT_BRANCH}" == "release/${NEW_VERSION}" ]]; then
git pull origin master
git pull origin main
else
echo "Invalid branch"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e

CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [[ "${CURRENT_BRANCH}" != "master" ]]; then
echo "Must be on master"
if [[ "${CURRENT_BRANCH}" != "main" ]]; then
echo "Must be on main branch"
exit 1
fi

Expand All @@ -16,7 +16,7 @@ if [ -z "${NEW_VERSION}" ]; then
exit 1
fi

git pull origin master
git pull origin main
git pull --tags --all -f
git tag "${NEW_VERSION}"
git push --tags

0 comments on commit 56ddcc7

Please sign in to comment.