Skip to content

Commit

Permalink
Update references from master to trunk (#28433)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend authored and youknowriad committed Mar 1, 2021
1 parent 7b1d189 commit d33003b
Show file tree
Hide file tree
Showing 38 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths-ignore:
- '**.md'
push:
branches: [master]
branches: [trunk]
tags:
- 'v*'
paths-ignore:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '!packages/**/test/**'
- '!packages/**/*.md'
push:
branches: [master, wp/trunk]
branches: [trunk, wp/trunk]
paths:
- 'packages/**'
- '!packages/**/test/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '**.md'
push:
branches:
- master
- trunk
- 'wp/**'
paths-ignore:
- '**.md'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
run: |
npm ci
- name: Compare performance with master
- name: Compare performance with trunk
if: github.event_name == 'pull_request'
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA master --tests-branch $GITHUB_SHA
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA trunk --tests-branch $GITHUB_SHA

- name: Compare performance with current WordPress Core and previous Gutenberg versions
if: github.event_name == 'release'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `master` (e.g. in the case of a merge).
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@v2
with:
ref: master
ref: trunk

# Changing into the action's directory and running `npm install` is much
# faster than a full project-wide `npm ci`.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths-ignore:
- '**.md'
push:
branches: [master]
branches: [trunk]
paths-ignore:
- '**.md'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths-ignore:
- '**.md'
push:
branches: [master]
branches: [trunk]
paths-ignore:
- '**.md'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- trunk
- 'wp/**'

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Storybook GitHub Pages
on:
push:
branches:
- master
- trunk

jobs:
deploy:
Expand All @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
ref: trunk

- name: Cache node modules
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- master
- trunk
- 'wp/**'

jobs:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Gutenberg

[![End-to-End Tests](https://github.com/WordPress/gutenberg/workflows/End-to-End%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22End-to-End+Tests%22+branch%3Amaster)
[![Static Analysis (Linting, License, Type checks...)](https://github.com/WordPress/gutenberg/workflows/Static%20Analysis%20(Linting,%20License,%20Type%20checks...)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Static+Analysis+%28Linting%2C+License%2C+Type+checks...%29%22+branch%3Amaster)
[![Unit Tests](https://github.com/WordPress/gutenberg/workflows/Unit%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster)
[![Create Block](https://github.com/WordPress/gutenberg/workflows/Create%20Block/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Create+Block%22+branch%3Amaster)
[![React Native E2E Tests (iOS)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(iOS)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28iOS%29%22+branch%3Amaster)
[![React Native E2E Tests (Android)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(Android)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28Android%29%22+branch%3Amaster)
[![End-to-End Tests](https://github.com/WordPress/gutenberg/workflows/End-to-End%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22End-to-End+Tests%22+branch%3Atrunk)
[![Static Analysis (Linting, License, Type checks...)](https://github.com/WordPress/gutenberg/workflows/Static%20Analysis%20(Linting,%20License,%20Type%20checks...)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Static+Analysis+%28Linting%2C+License%2C+Type+checks...%29%22+branch%3Atrunk)
[![Unit Tests](https://github.com/WordPress/gutenberg/workflows/Unit%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Unit+Tests%22+branch%3Atrunk)
[![Create Block](https://github.com/WordPress/gutenberg/workflows/Create%20Block/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Create+Block%22+branch%3Atrunk)
[![React Native E2E Tests (iOS)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(iOS)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28iOS%29%22+branch%3Atrunk)
[![React Native E2E Tests (Android)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(Android)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28Android%29%22+branch%3Atrunk)

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)

Expand Down
2 changes: 1 addition & 1 deletion bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async function runTestSuite( testSuite, performanceTestDirectory ) {
async function runPerformanceTests( branches, options ) {
// The default value doesn't work because commander provides an array.
if ( branches.length === 0 ) {
branches = [ 'master' ];
branches = [ 'trunk' ];
}

log(
Expand Down
20 changes: 10 additions & 10 deletions bin/plugin/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,37 +276,37 @@ async function runPushGitChangesStep(
}

/**
* Cherry-picks the version bump commit into master.
* Cherry-picks the version bump commit into trunk.
*
* @param {string} gitWorkingDirectoryPath Git Working Directory Path.
* @param {string} commitHash Commit to cherry-pick.
* @param {string} abortMessage Abort message.
*/
async function runCherrypickBumpCommitIntoMasterStep(
async function runCherrypickBumpCommitIntoTrunkStep(
gitWorkingDirectoryPath,
commitHash,
abortMessage
) {
await runStep(
'Cherry-picking the bump commit into master',
'Cherry-picking the bump commit into trunk',
abortMessage,
async () => {
await askForConfirmation(
'The plugin is now released. Proceed with the version bump in the master branch?',
'The plugin is now released. Proceed with the version bump in the trunk branch?',
true,
abortMessage
);
await git.discardLocalChanges( gitWorkingDirectoryPath );
await git.resetLocalBranchAgainstOrigin(
gitWorkingDirectoryPath,
'master'
'trunk'
);
await git.cherrypickCommitIntoBranch(
gitWorkingDirectoryPath,
commitHash,
'master'
'trunk'
);
await git.pushBranchToOrigin( gitWorkingDirectoryPath, 'master' );
await git.pushBranchToOrigin( gitWorkingDirectoryPath, 'trunk' );
}
);
}
Expand Down Expand Up @@ -462,10 +462,10 @@ async function releasePlugin( isRC = true ) {
abortMessage =
'Aborting! Make sure to manually cherry-pick the ' +
formats.success( commitHash ) +
' commit to the master branch.';
' commit to the trunk branch.';

// Cherry-picking the bump commit into master
await runCherrypickBumpCommitIntoMasterStep(
// Cherry-picking the bump commit into trunk
await runCherrypickBumpCommitIntoTrunkStep(
gitWorkingDirectory,
commitHash,
abortMessage
Expand Down
4 changes: 2 additions & 2 deletions bin/plugin/lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async function resetLocalBranchAgainstOrigin(
}

/**
* Cherry-picks a commit into master
* Cherry-picks a commit into trunk
*
* @param {string} gitWorkingDirectoryPath Local repository path.
* @param {string} commitHash Branch Name
Expand All @@ -136,7 +136,7 @@ async function cherrypickCommitIntoBranch(
commitHash
) {
const simpleGit = SimpleGit( gitWorkingDirectoryPath );
await simpleGit.checkout( 'master' );
await simpleGit.checkout( 'trunk' );
await simpleGit.raw( [ 'cherry-pick', commitHash ] );
}

Expand Down
2 changes: 1 addition & 1 deletion bin/test-create-block.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# This script validates whether `npm init @wordpress/block` works properly
# with the latest changes applied to the `master` branch. It purposefully
# with the latest changes applied to the `trunk` branch. It purposefully
# avoids installing `@wordpress/scripts` package from npm when scaffolding
# a test block and uses the local package by executing everything from the
# root of the project.
Expand Down
8 changes: 4 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,7 @@ Fix action GitHub action workflow YAML syntax errors. ([23844](https://github.co
- Global styles provider. ([21637](https://github.com/WordPress/gutenberg/pull/21637))
- Update existing templates to use new blocks. ([21857](https://github.com/WordPress/gutenberg/pull/21857))
- Enable pullquote block. ([21930](https://github.com/WordPress/gutenberg/pull/21930))
- Merge release branch back to master for v1.27.1. ([22234](https://github.com/WordPress/gutenberg/pull/22234))
- Merge release branch back to trunk for v1.27.1. ([22234](https://github.com/WordPress/gutenberg/pull/22234))
- Wrap button blocks with buttons blocks in page templates. ([21939](https://github.com/WordPress/gutenberg/pull/21939))
- Components: Create a separate .native entry for ToolbarItem. ([22229](https://github.com/WordPress/gutenberg/pull/22229))

Expand Down Expand Up @@ -5810,7 +5810,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Fix Travis instability by [waiting for MySQL availability](https://github.com/WordPress/gutenberg/pull/16461) before install the plugin.
- Continue the [generic RichText component](https://github.com/WordPress/gutenberg/pull/16309) refactoring.
- Remove the [usage of the editor store](https://github.com/WordPress/gutenberg/pull/16184) from the block editor module.
- Update the [MilestoneIt Github action](https://github.com/WordPress/gutenberg/pull/16511) to read the plugin version from master.
- Update the [MilestoneIt Github action](https://github.com/WordPress/gutenberg/pull/16511) to read the plugin version from trunk.
- Refactor the post meta block attributes to use a generic [custom sources mechanism](https://github.com/WordPress/gutenberg/pull/16402).
- Expose [position prop in DotTip](https://github.com/WordPress/gutenberg/pull/14972) component.
- Avoid docker [containers automatic restart](https://github.com/WordPress/gutenberg/pull/16547).
Expand Down Expand Up @@ -7659,7 +7659,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
* Fix keyboard interaction (up/down arrow keys) causing focus to transfer out of the default block’s insertion menu.
* Fix regression causing dynamic blocks not rendering in the frontend.
* Fix vertical alignment issue on Media & Text block.
* Fix some linter errors in master branch.
* Fix some linter errors in trunk branch.
* Fix dash line in More/Next-Page blocks.
* Fix missing Categories block label.
* Fix embedding and demo tests.
Expand Down Expand Up @@ -9794,7 +9794,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
* Add security reporting instructions.
* Improve useOnce documentation.
* Bump copyright year to 2018 in license.md.
* Disable Travis branch builds except for master.
* Disable Travis branch builds except for trunk.

= 2.0.0 =

Expand Down
2 changes: 1 addition & 1 deletion docs/contributors/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The Gutenberg repository also includes [Storybook](https://storybook.js.org/) in

You can launch Storybook by running `npm run storybook:dev` locally. It will open in your browser automatically.

You can also test Storybook for the current `master` branch on GitHub Pages: [https://wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/)
You can also test Storybook for the current `trunk` branch on GitHub Pages: [https://wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/)

## Developer Tools

Expand Down
12 changes: 6 additions & 6 deletions docs/contributors/git-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ When many different people are working on a project simultaneously, pull request

There are two ways to do this: merging and rebasing. In Gutenberg, the recommendation is to rebase. Rebasing means rewriting your changes as if they're happening on top of the main line of development. This ensures the commit history is always clean and linear. Rebasing can be performed as many times as needed while you're working on a pull request. **Do share your work early on** by opening a pull request and keeping your history rebase as you progress.

The main line of development is known as the `master` branch. If you have a pull-request branch that cannot be merged into `master` due to a conflict (this can happen for long-running pull requests), then in the course of rebasing you'll have to manually resolve any conflicts in your local copy. Learn more in [section _Perform a rebase_](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#perform-a-rebase) of _How to Rebase a Pull Request_.
The main line of development is known as the `trunk` branch. If you have a pull-request branch that cannot be merged into `trunk` due to a conflict (this can happen for long-running pull requests), then in the course of rebasing you'll have to manually resolve any conflicts in your local copy. Learn more in [section _Perform a rebase_](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#perform-a-rebase) of _How to Rebase a Pull Request_.

Once you have resolved any conflicts locally you can update the pull request with `git push --force-with-lease`. Using the `--force-with-lease` parameter is important to guarantee that you don't accidentally overwrite someone else's work.

To sum it up, you need to fetch any new changes in the repository, rebase your branch on top of `master`, and push the result back to the repository. These are the corresponding commands:
To sum it up, you need to fetch any new changes in the repository, rebase your branch on top of `trunk`, and push the result back to the repository. These are the corresponding commands:

```sh
git fetch
git rebase master
git rebase trunk
git push --force-with-lease origin your-branch-name
```

Expand All @@ -126,8 +126,8 @@ To sync your fork, you first need to fetch the upstream changes and merge them i

``` sh
git fetch upstream
git checkout master
git merge upstream/master
git checkout trunk
git merge upstream/trunk
```

Once your local copy is updated, push your changes to update your fork on GitHub:
Expand All @@ -136,4 +136,4 @@ Once your local copy is updated, push your changes to update your fork on GitHub
git push
```

The above commands will update your `master` branch from _upstream_. To update any other branch replace `master` with the respective branch name.
The above commands will update your `trunk` branch from _upstream_. To update any other branch replace `trunk` with the respective branch name.
Loading

0 comments on commit d33003b

Please sign in to comment.