chore: rename master -> main in CI and scripts (#246)

Thanks for contributing to FOSS4G!
This commit is contained in:
Ian Saultz
2022-03-07 14:40:06 -05:00
committed by GitHub
parent e1cd6f829f
commit ea234edf67
28 changed files with 46 additions and 46 deletions

View File

@@ -12,7 +12,7 @@ scripts/check_binary_size.js "MapboxGLAndroidSDK/build/intermediates/intermediat
# Track overall library size
scripts/check_binary_size.js "MapboxGLAndroidSDK/build/outputs/aar/MapboxGLAndroidSDK-release.aar" "Android AAR"
if [[ $CIRCLE_BRANCH == master ]]; then
if [[ $CIRCLE_BRANCH == main ]]; then
# Build source data for http://mapbox.github.io/mapbox-gl-native/metrics/binary-size/
# and log binary sizes to metrics warehouse
scripts/publish_binary_size.js

View File

@@ -54,7 +54,7 @@ const bestReleaseNotesForCurrentVersion = semver.minSatisfying(versionsInRelease
const currentReleaseNotes = _.find(releaseNotes, { version: bestReleaseNotesForCurrentVersion });
if (!currentReleaseNotes) {
console.error('Could not find a release section satisfying %s in %s — did you forget to rename the "master" section to %s?', currentVersion, changelogPath, currentVersion.split("-")[0]);
console.error('Could not find a release section satisfying %s in %s — did you forget to rename the "main" section to %s?', currentVersion, changelogPath, currentVersion.split("-")[0]);
process.exit(1);
}

View File

@@ -3,31 +3,31 @@ Utility to schedule SDK builds on CircleCI.
Examples:
- Publish a snapshot from master (release.py uses the current branch)
- Publish a snapshot from main (release.py uses the current branch)
$ git branch
* master
* main
1234-fix-crash
$ python release.py --stage snapshot
- Publish a snapshot from a feature branch (same as before, just switch branchs with git):
$ git branch
master
main
* 1234-fix-crash
$ python release.py --stage snapshot
- Publish a beta from a pre-release branch:
$ git branch
master
main
* release-android-420-beta1
$ python release.py --stage beta --version 4.2.0-beta.1
- Publish a beta from a release branch:
$ git branch
master
main
* release-android-420
$ python release.py --stage final --version 4.2.0
@@ -97,13 +97,13 @@ def validate_branch(stage):
branch = git_get_current_branch()
if not branch:
abort_with_message('The current folder is not a git repository.')
if branch == 'master' and stage != 'snapshot':
if branch == 'main' and stage != 'snapshot':
abort_with_message('You need to swtich to a release branch for a beta or a final release.')
return branch
def validate_version(stage, branch, version):
if stage == 'snapshot' and branch == 'master' and version != CURRENT_VERSION_TAG:
abort_with_message('You cannot specify a custom version if you are building a snapshot from master.')
if stage == 'snapshot' and branch == 'main' and version != CURRENT_VERSION_TAG:
abort_with_message('You cannot specify a custom version if you are building a snapshot from main.')
if not version or version == CURRENT_VERSION_TAG:
version = get_current_version(file_path=GRADLE_PROPERTIES_PATH, file_var=GRADLE_TOKEN)
@@ -122,7 +122,7 @@ def validate_version(stage, branch, version):
def publish_snapshot(branch, version):
click.echo('Publishing snapshot for branch: %s (version: %s).' % (branch, version))
if branch != 'master':
if branch != 'main':
dirty_gradle = update_current_version(file_path=GRADLE_PROPERTIES_PATH, file_var=GRADLE_TOKEN, version=version)
if dirty_gradle:
git_add(path=GRADLE_PROPERTIES_PATH)