Skip to content

Commit

Permalink
chore: rename master to main (#4676)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 authored Feb 14, 2023
1 parent addd4ca commit f5d271d
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a maven multi-module project including all vaadin flow components.

`master` branch is the latest version of all the components that will be released in the [Vaadin platform](https://github.com/vaadin/platform).
`main` branch is the latest version of all the components that will be released in the [Vaadin platform](https://github.com/vaadin/platform).

## Quick start

Expand Down Expand Up @@ -106,10 +106,10 @@ add the following dependency to your `pom.xml`:
```

## Flow documentation
Documentation for flow can be found in [Flow documentation](https://github.com/vaadin/flow-and-components-documentation/blob/master/documentation/Overview.asciidoc).
Documentation for flow can be found in [Flow documentation](https://github.com/vaadin/flow-and-components-documentation/blob/main/documentation/Overview.asciidoc).

## Contributing
- Use the coding conventions from [Flow coding conventions](https://github.com/vaadin/flow/tree/master/eclipse)
- Use the coding conventions from [Flow coding conventions](https://github.com/vaadin/flow/tree/main/eclipse)
- [Submit a pull request](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) with detailed title and description
- Wait for response from one of Vaadin Flow team members

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
<artifactId>formatter-maven-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<configFile>https://raw.githubusercontent.com/vaadin/flow/master/eclipse/VaadinJavaConventions.xml</configFile>
<configFile>https://raw.githubusercontent.com/vaadin/flow/main/eclipse/VaadinJavaConventions.xml</configFile>
<skipHtmlFormatting>true</skipHtmlFormatting>
<lineEnding>LF</lineEnding>
<excludes>
Expand Down
6 changes: 3 additions & 3 deletions scripts/cherryPick.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async function cherryPickCommits(){
for(let i=arrPR.length-1; i>=0; i--){
let branchName = `cherry-pick-${arrPR[i]}-to-${arrBranch[i]}-${Date.now()}`;

await exec('git checkout master');
await exec('git checkout main');
await exec('git pull');
await exec(`git checkout ${arrBranch[i]}`);
await exec(`git reset --hard origin/${arrBranch[i]}`);
Expand All @@ -134,14 +134,14 @@ async function cherryPickCommits(){
await labelCommit(arrURL[i], `need to pick manually ${arrBranch[i]}`);
await postComment(arrURL[i], arrUser[i], arrMergedBy[i], arrBranch[i], err);
await exec(`git cherry-pick --abort`);
await exec(`git checkout master`);
await exec(`git checkout main`);
await exec(`git branch -D ${branchName}`);
continue;
}
await exec(`git push origin HEAD:${branchName}`);

await createPR(arrTitle[i], branchName, arrBranch[i]);
await exec(`git checkout master`);
await exec(`git checkout main`);
await exec(`git branch -D ${branchName}`);
await labelCommit(arrURL[i], `cherry-picked-${arrBranch[i]}`);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/generateChangeLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function getReleases() {
try {
json = await getPlatformVersions(platform);
} catch (error) {
json = await getPlatformVersions('master');
json = await getPlatformVersions('main');
}
flowVersion = json.core.flow.javaVersion;

Expand Down
6 changes: 3 additions & 3 deletions scripts/lib/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ async function currentBranch() {
const parentJs = await xml2js.parseStringPromise(fs.readFileSync('pom.xml', 'utf8'));
const version = parentJs.project.version[0];
const branch = version.replace(/^(\d+\.\d+).*$/, '$1');
const isMaster = !await checkBranch(branch);
return isMaster ? 'master' : branch;
const isMain = !await checkBranch(branch);
return isMain ? 'main' : branch;
}

async function getPlatformVersions(branch) {
Expand All @@ -58,7 +58,7 @@ async function getVersions() {
return ['core', 'vaadin'].reduce((prev, k) => {
return prev.concat(Object.keys(json[k]).filter(pkg => json[k][pkg].npmName || json[k][pkg].javaVersion).map(pkg => {
const version = json[k][pkg].javaVersion;
const branch = version && version.replace('{{version}}', 'master').replace(/^(\d+\.\d+).*$/, '$1');
const branch = version && version.replace('{{version}}', 'main').replace(/^(\d+\.\d+).*$/, '$1');
json[k][pkg].name = pkg;
json[k][pkg].branch = branch;
json[k][pkg].module = pkg;
Expand Down
2 changes: 1 addition & 1 deletion scripts/mergeITs.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async function createInitListener() {
copyFileSync(`${templateDir}/index.html`, `${targetFolder}/index.html`);
}

// Copy components sources from master to the merged integration-tests module
// Copy components sources from main to the merged integration-tests module
// At the same time does some source-code changes to adapt them to the new module
async function copySources() {
if (!fs.existsSync(itFolder)) {
Expand Down
12 changes: 6 additions & 6 deletions scripts/prepareDeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ pomVersion=`cat pom.xml | grep '<version>' | head -1 | cut -d '>' -f2 | cut -d '
versionBase=`getBaseVersion $version`
pomBase=`getBaseVersion $pomVersion`

### Get the master branch version for components
masterPom=`curl -s "https://raw.githubusercontent.com/vaadin/flow-components/master/pom.xml"`
masterMajorMinor=`echo "$masterPom" | grep '<version>' | cut -d '>' -f2 |cut -d '<' -f1 | grep "^$base" | head -1 | cut -d '-' -f1`
### Get the main branch version for components
mainPom=`curl -s "https://raw.githubusercontent.com/vaadin/flow-components/main/pom.xml"`
mainMajorMinor=`echo "$mainPom" | grep '<version>' | cut -d '>' -f2 |cut -d '<' -f1 | grep "^$base" | head -1 | cut -d '-' -f1`

### Load versions file for this platform release
branch=$versionBase
[ $branch = $masterMajorMinor ] && branch=master
[ $branch = $mainMajorMinor ] && branch=main
versions=`curl -s "https://raw.githubusercontent.com/vaadin/platform/$branch/versions.json"`
[ $? != 0 ] && branch=master && versions=`curl -s "https://raw.githubusercontent.com/vaadin/platform/$branch/versions.json"`
[ $? != 0 ] && branch=main && versions=`curl -s "https://raw.githubusercontent.com/vaadin/platform/$branch/versions.json"`

### Check that current branch is valid for the version to release
[ $branch != master -a "$versionBase" != "$pomBase" ] && echo "Incorrect pomVersion=$pomVersion for version=$version" && exit 1
[ $branch != main -a "$versionBase" != "$pomBase" ] && echo "Incorrect pomVersion=$pomVersion for version=$version" && exit 1

### Compute flow version
flow=`getPlatformVersion flow`
Expand Down
2 changes: 1 addition & 1 deletion scripts/updatePlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function main() {
const byName = ['core', 'vaadin', 'bundles'].reduce((prev, k) => {
Object.keys(json[k]).filter(pkg => (json[k][pkg].npmName || json[k][pkg].javaVersion) && pkg !== 'vaadin-core' ).map(pkg => {
const version = json[k][pkg].javaVersion;
const branch = version && version.replace('{{version}}', 'master').replace(/^(\d+\.\d+).*$/, '$1');
const branch = version && version.replace('{{version}}', 'main').replace(/^(\d+\.\d+).*$/, '$1');
prev[pkg] = prev[pkg] || {};
prev[pkg]['org'] = json[k][pkg];
prev[pkg].package = pkg;
Expand Down
2 changes: 1 addition & 1 deletion scripts/updateSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function computeRoute(wcname, clname, prefix, route, suffix) {
: `${wcname}/${route ? route : rootRoutes[wcname]}`;
return `${prefix}${route}${suffix}`;
}
// Replace @Route values from master to unique routes in the merged module
// Replace @Route values from main to unique routes in the merged module
function replaceRoutes(wcname, clname, content) {
content = content.replace(/\@Route *\n/, (...args) => {
return `@Route(value = "${/^Main(View)?$/.test(clname) ? '': clname.replace(/View$/, '').toLowerCase()}")\n`
Expand Down
2 changes: 1 addition & 1 deletion vaadin-virtual-list-flow-parent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VirtualList component for Vaadin Flow

This project is the Component wrapper implementation of [`<vaadin-virtual-list>`](https://github.com/vaadin/web-components/tree/master/packages/vaadin-virtual-list) element
This project is the Component wrapper implementation of [`<vaadin-virtual-list>`](https://github.com/vaadin/web-components/tree/main/packages/vaadin-virtual-list) element
for use from the server side with [Vaadin Flow](https://github.com/vaadin/flow).

## Using the component in a Flow application
Expand Down

0 comments on commit f5d271d

Please sign in to comment.