Skip to content

Commit

Permalink
[TASK] Change default branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Mar 17, 2024
1 parent a11379a commit e1a0c85
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request: null
push:
branches:
- master
- main

jobs:
code_coverage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php_cs_fixer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Format (PHP)
on:
pull_request:
branches:
- master
- main
- 2.0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request: null
push:
branches:
- master
- main

jobs:
phpstan:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Neos/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you would like to deploy a Neos website a good starting point is to use the N
->setOption('keepReleases', 3)
->setOption('composerCommandPath', 'composer')
->setOption('repositoryUrl', '<my repository url>')
->setOption('branch', 'master')
->setOption('branch', 'main')
->setOption('updateMethod', null)
->setOption('baseUrl', 'https://my.node.com')
->setOption('flushCacheList', [
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ copyright = since 2011 by the contributors

# "Edit on GitHub" button
github_repository = TYPO3/Surf
github_branch = master
github_branch = main

# Footer links
project_home = https://packagist.org/packages/TYPO3/Surf
Expand Down
2 changes: 1 addition & 1 deletion Documentation/SmokeTesting/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ AdditionalConfiguration.php::

.htaccess::

# Add Rewrite rule near https://github.com/typo3/typo3/blob/master/typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess#L270
# Add Rewrite rule near https://github.com/TYPO3/typo3/blob/main/typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess#L270
RewriteCond %{HTTP_HOST} ^next\.example\.com$
RewriteRule .? - [E=TYPO3_CONTEXT:Testing]

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![Latest Stable Version](https://poser.pugx.org/typo3/surf/v/stable.svg)](https://packagist.org/packages/TYPO3/Surf)
[![Total Downloads](https://poser.pugx.org/typo3/surf/downloads.svg)](https://packagist.org/packages/TYPO3/Surf)
[![Monthly Downloads](https://poser.pugx.org/typo3/surf/d/monthly)](https://packagist.org/packages/TYPO3/Surf)
![Tests](https://github.com/TYPO3/Surf/workflows/Tests/badge.svg?branch=master&event=push)
[![Coverage Status](https://img.shields.io/coveralls/TYPO3/Surf/master.svg?style=flat-square)](https://coveralls.io/github/TYPO3/Surf?branch=master)
![Tests](https://github.com/TYPO3/Surf/workflows/Tests/badge.svg?branch=main&event=push)
[![Coverage Status](https://img.shields.io/coveralls/TYPO3/Surf/main.svg?style=flat-square)](https://coveralls.io/github/TYPO3/Surf?branch=main)

# Surf

Expand All @@ -20,14 +20,14 @@ Some features of the Surf package:

## Documentation

For further information please read the documentation https://docs.typo3.org/other/typo3/surf/master/en-us/.
For further information please read the documentation https://docs.typo3.org/other/typo3/surf/main/en-us/.

### Contributing to the documentation

You can simply edit or add a .rst file in the `Documentation` folder on GitHub and create a pull request.

The online documentation will automatically update after changes to the master branch.
To preview the documentation locally please follow this [guide](https://github.com/t3docs/docker-render-documentation).
The online documentation will automatically update after changes to the main branch.
To preview the documentation locally, please follow this [guide](https://github.com/t3docs/docker-render-documentation).

The documentation was set up according to the [TYPO3 documentation guide](https://docs.typo3.org/typo3cms/RenderTYPO3DocumentationGuide/Index.html).

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
"dev-main": "3.x-dev"
}
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Git/AbstractCheckoutTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function resolveSha1(Node $node, Deployment $deployment, array $option
);
$this->guardAgainstInvalidSha1($sha1, 'Could not retrieve sha1 of git tag "' . $options['tag'] . '"', 1335974915);
} else {
$branch = $options['branch'] ?? 'master';
$branch = $options['branch'] ?? 'main';
$sha1 = $this->shell->execute("git ls-remote {$options['repositoryUrl']} refs/heads/$branch | awk '{print $1 }'", $node, $deployment, true);
$this->guardAgainstInvalidSha1($sha1, 'Could not retrieve sha1 of git branch "' . $branch . '"', 1335974926);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Git/PushTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* $workflow
* ->setTaskOptions('TYPO3\Surf\Task\Git\PushTask', [
* 'remote' => '[email protected]:TYPO3/Surf.git',
* 'refspec' => 'master',
* 'refspec' => 'main',
* 'recurseIntoSubmodules' => true
* ]
* );
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Task/Git/PushTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function missingRefSpecOptionThrowsException(): void
*/
public function executeGitPushSuccessfully(): void
{
$options = ['remote' => 'https://github.com/12345/12345', 'refspec' => 'master:refs/heads/qa/master'];
$options = ['remote' => 'https://github.com/12345/12345', 'refspec' => 'master:refs/heads/qa/main'];
$this->task->execute($this->node, $this->application, $this->deployment, $options);
$this->assertCommandExecuted(
sprintf(
Expand All @@ -68,7 +68,7 @@ public function executeGitPushWithRecurseIntoSubmodulesSuccessfully(): void
{
$options = [
'remote' => 'https://github.com/12345/12345',
'refspec' => 'master:refs/heads/qa/master',
'refspec' => 'master:refs/heads/qa/main',
'recurseIntoSubmodules' => true
];
$this->task->execute($this->node, $this->application, $this->deployment, $options);
Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/Task/GitCheckoutTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function executeWithEmptyOptionsAndValidSha1FetchesResetsCopiesAndCleansR
'repositoryUrl' => 'ssh://git.example.com/project/path.git'
];
$this->responses = [
'git ls-remote ssh://git.example.com/project/path.git refs/heads/master | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
'git ls-remote ssh://git.example.com/project/path.git refs/heads/main | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
];
$this->task->execute($this->node, $this->application, $this->deployment, $options);

Expand Down Expand Up @@ -124,7 +124,7 @@ public function executeWithDisabledRecursiveSubmodulesOptionDoesNotUpdateSubmodu
'recursiveSubmodules' => false
];
$this->responses = [
'git ls-remote ssh://git.example.com/project/path.git refs/heads/master | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
'git ls-remote ssh://git.example.com/project/path.git refs/heads/main | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
];
$this->task->execute($this->node, $this->application, $this->deployment, $options);

Expand All @@ -140,7 +140,7 @@ public function executeWithoutRecursiveSubmodulesOptionUpdatesSubmodulesRecursiv
'repositoryUrl' => 'ssh://git.example.com/project/path.git'
];
$this->responses = [
'git ls-remote ssh://git.example.com/project/path.git refs/heads/master | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
'git ls-remote ssh://git.example.com/project/path.git refs/heads/main | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
];
$this->task->execute($this->node, $this->application, $this->deployment, $options);

Expand All @@ -157,7 +157,7 @@ public function executeWithFetchAllTagsOptionExecutesFetchTags(): void
'fetchAllTags' => true
];
$this->responses = [
'git ls-remote ssh://git.example.com/project/path.git refs/heads/master | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
'git ls-remote ssh://git.example.com/project/path.git refs/heads/main | awk \'{print $1 }\'' => 'd5b7769852a5faa69574fcd3db0799f4ffbd9eec'
];
$this->task->execute($this->node, $this->application, $this->deployment, $options);

Expand All @@ -175,7 +175,7 @@ public function executeWithEmptyOptionsAndInvalidSha1ThrowsException(): void
'repositoryUrl' => 'ssh://git.example.com/project/path.git'
];
$this->responses = [
'git ls-remote ssh://git.example.com/project/path.git refs/heads/master | awk \'{print $1 }\'' => 'foo-bar d5b7769852a5faa69574fcd3db0799f4ffbd9eec'
'git ls-remote ssh://git.example.com/project/path.git refs/heads/main | awk \'{print $1 }\'' => 'foo-bar d5b7769852a5faa69574fcd3db0799f4ffbd9eec'
];

try {
Expand Down

0 comments on commit e1a0c85

Please sign in to comment.