Skip to content

Commit

Permalink
Move all "master" uses to "main"
Browse files Browse the repository at this point in the history
The canonical repository https://github.com/moodlehq/moodle-plugin-ci
has moved its "master" branch to "main".

So, here, we are adjusting all the places where the, now old, "master"
branch was being used. Usually that includes:

- CI Integrations (GHA, Travis...).
- Docs: READMEs, change logs, comments, any link pointing to "master" in general.
- Cases in code base that may depend of git branch name (unlikely, but...)
  • Loading branch information
stronk7 committed Nov 30, 2023
1 parent 693a638 commit 27e7c5a
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
matrix:
include:
- php: '8.2'
moodle-branch: 'master'
moodle-branch: 'main'
- php: '8.2'
moodle-branch: 'MOODLE_403_STABLE'
- php: '8.2'
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
include:
# Each supported PHP version once. That's enough.
- php: '8.2'
moodle-branch: 'master'
moodle-branch: 'main'
- php: '8.1'
moodle-branch: 'MOODLE_403_STABLE'
- php: '8.0'
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ jobs:

- stage: Integration tests
if: env(MOODLE_BRANCH) IS present
# Only master with highest supported PHP version.
# Only main with highest supported PHP version.
- php: 8.2
env: MOODLE_BRANCH=master
env: MOODLE_BRANCH=main
# Last stable with highest supported PHP version.
- php: 8.2
env: MOODLE_BRANCH=MOODLE_402_STABLE
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Latest Stable Version](https://poser.pugx.org/moodlehq/moodle-plugin-ci/v)](//packagist.org/packages/moodlehq/moodle-plugin-ci)
![Moodle Plugin CI](https://github.com/moodlehq/moodle-plugin-ci/workflows/Moodle%20Plugin%20CI/badge.svg)
[![Build Status](https://travis-ci.com/moodlehq/moodle-plugin-ci.svg?branch=master)](https://travis-ci.com/moodlehq/moodle-plugin-ci)
[![codecov](https://codecov.io/gh/moodlehq/moodle-plugin-ci/branch/master/graph/badge.svg?token=I3PPJ383G7)](https://codecov.io/gh/moodlehq/moodle-plugin-ci)
[![Moodle Plugin CI](https://github.com/moodlehq/moodle-plugin-ci/actions/workflows/test.yml/badge.svg)](https://github.com/moodlehq/moodle-plugin-ci/actions/workflows/test.yml)
[![Build Status](https://app.travis-ci.com/moodlehq/moodle-plugin-ci.svg?branch=main)](https://app.travis-ci.com/github/moodlehq/moodle-plugin-ci)
[![codecov](https://codecov.io/gh/moodlehq/moodle-plugin-ci/branch/main/graph/badge.svg?token=I3PPJ383G7)](https://codecov.io/gh/moodlehq/moodle-plugin-ci)
[![Total Downloads](https://poser.pugx.org/moodlehq/moodle-plugin-ci/downloads)](//packagist.org/packages/moodlehq/moodle-plugin-ci)
[![License](https://poser.pugx.org/moodlehq/moodle-plugin-ci/license)](//packagist.org/packages/moodlehq/moodle-plugin-ci)

Expand Down Expand Up @@ -31,3 +31,4 @@ Many, many thanks to all the collaborators, very specially to **Mark Nielsen** f
making this product such a great tool for the entire **Moodle development community**, we'll try to keep the bar high!

And, of course, everybody is welcome to participate and help here, it's **Open Source**, you know!
/
2 changes: 1 addition & 1 deletion docs/AddExtraPlugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You may add as many plugins as you like, by simply calling the `add-plugin` comm
command takes a single argument and that is your GitHub account name and the project name. So, in the example, it
would clone `https://github.com/moodlehq/moodle-local_hub.git`.

By default, the branch that is cloned is the `master` branch. You can use the `--branch` (`-b`) option to override
If not specified, the default branch of the repository is used (normally `main`). You can use the `--branch` (`-b`) option to override
this behavior. If you use the same branch names as Moodle (EG: `MOODLE_XY_STABLE`), then a handy trick is to pass
the `$MOODLE_BRANCH` build variable to the `add-plugin` command. Here is an example:

Expand Down
36 changes: 18 additions & 18 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
php: error while loading shared libraries: libonig.so.5
```

To avoid that problem it's recommended to to add the `libonig5` package to the `travis.yml` file. For a working example, please reference the updated `.travis.dist.yml`file.
To avoid that problem, it's recommended to to add the `libonig5` package to the `travis.yml` file. For a working example, please reference the updated `.travis.dist.yml`file.

## [4.1.8] - 2023-10-20
### Changed
Expand Down Expand Up @@ -164,18 +164,18 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt

### Fixed
- Updated to `php-coveralls/php-coveralls` v2 for uploading coverage results to [Coveralls](https://coveralls.io) with the `coveralls-upload` command.
- ACTION REQUIRED: Review any use of the `coveralls-upload` command in GHA and ensure that `COVERALLS_REPO_TOKEN` is set in the environment. See [Coveralls integration](https://github.com/moodlehq/moodle-plugin-ci/blob/master/docs/CodeCoverage.md#coveralls-integration) for more information.
- ACTION REQUIRED: Review any use of the `coveralls-upload` command in GHA and ensure that `COVERALLS_REPO_TOKEN` is set in the environment. See [Coveralls integration](https://github.com/moodlehq/moodle-plugin-ci/blob/main/docs/CodeCoverage.md#coveralls-integration) for more information.

## [3.4.4] - 2023-01-20
### Changed
- Updated to `php-compatibility` dev version. This was needed because the last release is from 2019 and, until a new release is available, it was the only way to get it working with PHP 8.1 and above and some good new Sniffs incorporated.

## [3.4.3] - 2022-12-24
### Changed
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
(and documentation) to fulfil [Moodle 4.2 new requirements](https://tracker.moodle.org/browse/MDL-74905).
- ACTION REQUIRED: Review existing integrations running tests against master (4.2dev). There are a few Moodle 4.2 new requirements:
- ACTION REQUIRED: Review existing integrations running tests against main (4.2dev). There are a few Moodle 4.2 new requirements:
- PHP 8.0 is required (instead of 7.4).
- PostgreSQL 13 is required (instead of 12).
- MariaDB 10.6 is required (instead of 10.4).
Expand All @@ -198,10 +198,10 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- `moodle-plugin-ci install` now provides an option `--db-port` to define a custom database port.

### Changed
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
(and documentation) to fulfil [Moodle 4.1 new requirements](https://tracker.moodle.org/browse/MDL-71747).
- ACTION REQUIRED: Review existing integrations running tests against master (4.1dev). There are a few Moodle 4.1 new requirements:
- ACTION REQUIRED: Review existing integrations running tests against main (4.1dev). There are a few Moodle 4.1 new requirements:
- PHP 7.4 is required (instead of 7.3).
- PostgreSQL 12 is required (instead of 10). Pay special attention to the changes needed for this and Travis!
- MariaDB 10.4 is required (instead of 10.2.29).
Expand Down Expand Up @@ -229,7 +229,7 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
## [3.2.5] - 2022-03-31
### Changed
- ACTION SUGGESTED: Now, it's safe to 'unpin' the MariaDB version in all integrations. With MariaDB 10.6.7 and 10.7.3 already released, the existing problems are gone, so it's possible to move away from the older 10.5 version. To achieve that, just look for any use of `image: mariadb:10.5` and change it to `image: mariadb:10`. For more information, see [MDL-72131](https://tracker.moodle.org/browse/MDL-72131).
- Updated version of [moodle-local_codechecker](https://github.com/moodlehq/moodle-local_codechecker) to v3.1.0. For list of changes see [changelog](https://github.com/moodlehq/moodle-local_codechecker/blob/master/CHANGES.md#changes-in-version-310-20220225---fondant-chocolate), you should expect numerous `@covers` annotation warnings in particular.
- Updated version of [moodle-local_codechecker](https://github.com/moodlehq/moodle-local_codechecker) to v3.1.0. For list of changes see [changelog](https://github.com/moodlehq/moodle-local_codechecker/blob/main/CHANGES.md#changes-in-version-310-20220225---fondant-chocolate), you should expect numerous `@covers` annotation warnings in particular.

### Added
- Use utf8mb4 for MySQL and MariaDB setup.
Expand Down Expand Up @@ -267,8 +267,8 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- New tool-agnostic `CI_BUILD_DIR` env. variable that can be used instead of the old `TRAVIS_BUILD_DIR` one. Note that support for the later [will be removed](https://github.com/moodlehq/moodle-plugin-ci/issues/118) at some point in the future.

### Changed
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
- Updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
to use PostgreSQL 10 (Moodle 4.0 new requirement).
- ACTION REQUIRED: Existing integrations running tests with PostgreSQL now need to use version 10 or newer.
- ACTION REQUIRED: Existing integrations running tests with MariaDB must avoid using the 10.6 version and use 10.5 instead. It comes with some changes making it incompatible with Moodle default installation. To achieve that, just look for any use of `image: mariadb:10` and change it to `image: mariadb:10.5`. This is being tracked @ [MDL-72131]( https://tracker.moodle.org/browse/MDL-72131) and, once fixed, it will be possible to go back to the original image.
Expand All @@ -283,8 +283,8 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
only if adding PHP 8 jobs. These changes include 1) Setting up the `max_input_vars=5000`
PHP configuration setting, for all runs, and 2) Enabling the `xmlrpc-beta` extension
if the plugin requires xmlrpc services, only for PHP 8 runs. See
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml) for more information.
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml) and
[.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml) for more information.

### Changed
- Updated various internal dependencies and tools.
Expand All @@ -311,12 +311,12 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- ACTION REQUIRED: If you are using GitHub Actions, add `NVM_DIR` definition
in "Initialise moodle-plugin-ci" step. Without it `nvm` can't be used for
node version switching, see the step definition at
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml)
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml)
and add missing `NVM_DIR` line your plugin's GHA workflow file.

### Changed
- `moodle-plugin-ci add-plugin` command now uses default banch to checkout
instead of `master` if `--branch` param is not specified..
instead of `main` if `--branch` param is not specified..

## [3.0.4] - 2021-01-29
### Fixed
Expand All @@ -333,7 +333,7 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt

### Added
- Detect existence of legacy php-webdriver, and use a different Firefox image when it is in use.
- Add [manual](https://github.com/moodlehq/moodle-plugin-ci/blob/master/docs/index.md) and [example](https://github.com/moodlehq/moodle-plugin-ci/blob/master/docs/GHAFileExplained.md) on using GitHub Actions as CI tool.
- Add [manual](https://github.com/moodlehq/moodle-plugin-ci/blob/main/docs/index.md) and [example](https://github.com/moodlehq/moodle-plugin-ci/blob/main/docs/GHAFileExplained.md) on using GitHub Actions as CI tool.

## [3.0.3] - 2020-10-16
### Changed
Expand Down Expand Up @@ -616,7 +616,7 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- `moodle-plugin-ci shifter` command. Run YUI Shifter on plugin YUI modules.
- `moodle-plugin-ci csslint` command. Lints the CSS files in the plugin.

[Unreleased]: https://github.com/moodlehq/moodle-plugin-ci/compare/4.1.8...master
[Unreleased]: https://github.com/moodlehq/moodle-plugin-ci/compare/4.1.8...main
[4.1.8]: https://github.com/moodlehq/moodle-plugin-ci/compare/4.1.7...4.1.8
[4.1.7]: https://github.com/moodlehq/moodle-plugin-ci/compare/4.1.6...4.1.7
[4.1.6]: https://github.com/moodlehq/moodle-plugin-ci/compare/4.1.5...4.1.6
Expand Down Expand Up @@ -681,4 +681,4 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
[1.3.0]: https://github.com/moodlehq/moodle-plugin-ci/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/moodlehq/moodle-plugin-ci/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/moodlehq/moodle-plugin-ci/compare/1.0.0...1.1.0
[.travis.dist.yml]: https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml
[.travis.dist.yml]: https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml
2 changes: 1 addition & 1 deletion docs/GHAFileExplained.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: GitHub Actions CI workflow file explained
---

Below is the
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml)
[gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml)
file with comments added to explain what each section is doing. For additional
information please refer to [workflow syntax reference](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions).

Expand Down
4 changes: 2 additions & 2 deletions docs/ReleaseNewVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Prior to tagging a release, ensure the following have been updated:
Any other version will automatically be used.

When all the changes above have been performed, push them straight upstream to
`master` or create a standard PR to get them reviewed and incorporated
`main` or create a standard PR to get them reviewed and incorporated
upstream. In the latter case, use your repo clone for PR - this way Packagist
will not capture new branch in the list of tags and you will not end up having
double CI build on Travis, also when merging PR, please **avoid merge commit**
(use "Rebase and merge" option).

Once all code and commits are in place and verified, you need to tag a
release. Tag `master` branch `HEAD` and push using commands:
release. Tag `main` branch `HEAD` and push using commands:

```bash
$ git tag -a 4.0.8 -m "Release version 4.0.8"
Expand Down
2 changes: 1 addition & 1 deletion docs/TravisFileExplained.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: page
title: Travis CI file explained
---

Below is the [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
Below is the [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
file but with comments added to explain what each section is doing. For additional help,
see [Travis CI's documentation](http://docs.travis-ci.com/user/getting-started/).

Expand Down
4 changes: 2 additions & 2 deletions docs/UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Requirements have changed, this project now requires PHP 5.6 or later and Moodle

Detailed information about what changed in Version 2 can be found in the [change log](CHANGELOG.md).

## Step 3: Review the Travis CI configuration file
## Step 3: Review the Travis CI configuration file

Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
and update your `.travis.yml` file in your plugin. For detailed information about the contents of `.travis.dist.yml`
file, please see this [help document](TravisFileExplained.md). **Please carefully** review the updated
`.travis.dist.yml` as some steps have been removed and others added, like installation of Java 8,
Expand Down
2 changes: 1 addition & 1 deletion docs/UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Detailed information about what changed in Version 3 can be found in the [change

## Step 3: Review the Travis CI configuration file

Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
and update your `.travis.yml` file in your plugin. For detailed information about the contents of `.travis.dist.yml`
file, please see this [help document](TravisFileExplained.md). **Please carefully** review the updated
`.travis.dist.yml` as some steps have been removed (like installation of Java 8, installing of NodeJS, etc.) and others added.
Expand Down
6 changes: 3 additions & 3 deletions docs/UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Detailed information about what changed in Version 4 can be found in the [change

### GitHub Actions

Review the updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml)
Review the updated [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml)
and update the GitHub Action workflow file in your plugin (for example, `.github/workflows/ci.yml`). For detailed information about the contents of that `ci.yml` file, please see our [sample GitHub Action workflow explanation](GHAFileExplained.md).

A summary of the actions required for version 4 is:
Expand All @@ -27,7 +27,7 @@ A summary of the actions required for version 4 is:

### Travis CI

Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml)
Review the updated [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml)
and update your `.travis.yml` file in your plugin. For detailed information about the contents of `.travis.dist.yml`
file, please see our [sample Travis workflow file explanation](TravisFileExplained.md).

Expand Down Expand Up @@ -63,7 +63,7 @@ For example, for GitHub Actions, it can be setup as follows:
matrix:
include:
- php: 8.2
moodle-branch: master
moodle-branch: main
database: pgsql
plugin-ci: ^4 # Decide the version to use per matrix element.
...
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Follow steps to get your Moodle plugin building in CI tool of your choice.

#### Step 1

Copy [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml) file to `.github/workflows` directory
Copy [gha.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/gha.dist.yml) file to `.github/workflows` directory
in your project. You can give this file any name, e.g. `moodle-ci.yml` which we use in this document. Review the `moodle-ci.yml` contents and
remove anything that is not needed. See this [help document](GHAFileExplained.md) for an explanation about the
contents of the this file. Once you have added the `.github/workflows/moodle-ci.yml` file, commit and push up to GitHub, to trigger a
Expand All @@ -76,7 +76,7 @@ run a build to make sure nothing broke.

#### Step 2

Copy the [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/master/.travis.dist.yml) file into the
Copy the [.travis.dist.yml](https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml) file into the
root of your plugin and rename it to `.travis.yml`. Now might be a good time to review the `.travis.yml` contents and
remove anything that is not needed. See this [help document](TravisFileExplained.md) for an explanation about the
contents of the this file. Once you have added the `.travis.yml` file, commit and push up to GitHub, to trigger a
Expand Down Expand Up @@ -197,4 +197,4 @@ Semantic Versioning.
## License

This project is licensed under the GNU GPL v3 or later. See the
[LICENSE](https://github.com/moodlehq/moodle-plugin-ci/blob/master/LICENSE) file for details.
[LICENSE](https://github.com/moodlehq/moodle-plugin-ci/blob/main/LICENSE) file for details.
2 changes: 1 addition & 1 deletion tests/ValidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function testInvalidUrl($url)
public function gitBranchProvider()
{
return [
['master'],
['main'],
['MOODLE_27_STABLE'],
['MOODLE_28_STABLE'],
['MOODLE_29_STABLE'],
Expand Down

0 comments on commit 27e7c5a

Please sign in to comment.