Skip to content

Commit

Permalink
Default branch rename
Browse files Browse the repository at this point in the history
Helps with whatwg/meta#174.
  • Loading branch information
annevk committed Jan 13, 2021
1 parent 9ff4317 commit ad09cbe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ if [[ "$GITHUB_ACTIONS" == "true" ]]; then
echo ""
fi

# This ensures that only changes to the master branch get deployed.
# (The repository_dispatch event is always for the master branch.)
if [[ ("$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/master") ||
# This ensures that only changes to the main branch get deployed.
# (The repository_dispatch event is always for the main branch.)
if [[ ("$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main") ||
"$GITHUB_EVENT_NAME" == "repository_dispatch" ]]; then
header "Synchronizing content with whatwg.org et al"
eval "$(ssh-agent -s)"
Expand Down
6 changes: 3 additions & 3 deletions resources.whatwg.org/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The resources in this folder are used for building WHATWG standards.
The `deploy.sh` script is used by most WHATWG standards and is meant to run either in GitHub Actions to build/deploy, or locally for preview purposes. It performs the following steps:

- Running [Bikeshed](https://github.com/tabatkins/bikeshed), through its [web API](https://api.csswg.org/bikeshed/), to produce:
- If on master, the built Living Standard, as well as a commit snapshot
- If on the main branch, the built Living Standard, as well as a commit snapshot
- Otherwise, a branch snapshot of the standard
- Running the [Nu HTML checker](http://checker.html5.org/) on the build results
- Deploying the build results to the WHATWG web server (on push to master, not on pull requests)
- Deploying the build results to the WHATWG web server (on push to the main branch, not on pull requests)

For GitHub Actions deploys, the following environment variables are required:
- `$SERVER` is the server to deploy to.
Expand Down Expand Up @@ -47,4 +47,4 @@ curl --remote-name --fail https://resources.whatwg.org/build/review.sh && bash .

or more typically `make review`.

Please see https://github.com/whatwg/meta/blob/master/MAINTAINERS.md for information on creating and announcing Review Drafts.
Please see https://github.com/whatwg/meta/blob/main/MAINTAINERS.md for information on creating and announcing Review Drafts.
8 changes: 4 additions & 4 deletions resources.whatwg.org/build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -o errexit
set -o nounset

# This script is maintained at
# https://github.com/whatwg/whatwg.org/tree/master/resources.whatwg.org/build.
# https://github.com/whatwg/whatwg.org/tree/main/resources.whatwg.org/build.
# See README.md for documentation.

# This extracts the repository name from the remote URL, as the component after the final slash,
Expand Down Expand Up @@ -116,7 +116,7 @@ echo "Living standard output to $WEB_ROOT"
echo ""

header "Starting review drafts (if applicable)..."
echo "Note: review drafts must be added or changed in a single commit on master"
echo "Note: review drafts must be added or changed in a single commit on main"
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
for CHANGED in $CHANGED_FILES; do # Omit quotes around variable to split on whitespace
if ! [[ "$CHANGED" =~ ^review-drafts/.*.bs$ ]]; then
Expand Down Expand Up @@ -178,8 +178,8 @@ if [[ "$GITHUB_ACTIONS" == "true" ]]; then
echo ""
fi

# Deploy from push to master branch on non-forks only
if [[ "$GITHUB_REPOSITORY" == whatwg/* && "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/master" ]]; then
# Deploy from push to main branch on non-forks only
if [[ "$GITHUB_REPOSITORY" == whatwg/* && "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" ]]; then
header "rsync to the WHATWG server..."
eval "$(ssh-agent -s)"
echo "$SERVER_DEPLOY_KEY" | ssh-add -
Expand Down
6 changes: 3 additions & 3 deletions resources.whatwg.org/build/review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ set -o errexit
set -o nounset

# This script is maintained at
# https://github.com/whatwg/whatwg.org/tree/master/resources.whatwg.org/build and assumes English as
# https://github.com/whatwg/whatwg.org/tree/main/resources.whatwg.org/build and assumes English as
# your locale. See README.md there for documentation.
#
# Please keep this synchronized with https://github.com/whatwg/html/blob/master/review-draft.sh.
# Please keep this synchronized with https://github.com/whatwg/html/blob/main/review-draft.sh.

header() {
echo ""
Expand All @@ -16,7 +16,7 @@ header() {

header "Creating a git branch with a Review Draft:"

git checkout master
git checkout main
git pull
git checkout -b "review-draft-$(date +'%F')"
echo ""
Expand Down
2 changes: 1 addition & 1 deletion whatwg.org/faq
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</nav>

<p><i>See also the
<a href="https://github.com/whatwg/html/blob/master/FAQ.md">HTML Standard FAQ</a>.</i>
<a href="https://github.com/whatwg/html/blob/main/FAQ.md">HTML Standard FAQ</a>.</i>

<h3 id="the-whatwg">The WHATWG<a class="self-link" href="#the-whatwg"></a></h3>

Expand Down

0 comments on commit ad09cbe

Please sign in to comment.