Skip to content

Commit 3b1faeb

Browse files
committed
Use main as new name for default git branch
1 parent 9d5f77f commit 3b1faeb

File tree

13 files changed

+19
-17
lines changed

13 files changed

+19
-17
lines changed

.github/workflows/differential_shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Differential ShellCheck
55
on:
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88

99
permissions:
1010
contents: read

.github/workflows/lint_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: lint-tests
33
on:
44
push:
55
branches-ignore:
6-
- c-master
6+
- c-main
77
- c-3.2
88
pull_request:
99

.github/workflows/linux_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: linux-tests
33
on:
44
push:
55
branches-ignore:
6-
- c-master
6+
- c-main
77
- c-3.2
88
pull_request:
99

.github/workflows/windows_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: windows-tests
33
on:
44
push:
55
branches-ignore:
6-
- c-master
6+
- c-main
77
- c-3.2
88
pull_request:
99

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ releases and current branch are built. Different tests are run against each
157157
version and the execution time of each test is reported in millisecond::
158158

159159
$ script/mb
160-
| v4.1.4 | v4.3.1 | v4.5.3 | v4.7.1 | v5.1.1 | master |
160+
| v4.1.4 | v4.3.1 | v4.5.3 | v4.7.1 | v5.1.1 | main |
161161
----------+----------+----------+----------+----------+----------+----------+
162162
help | 9 | 12 | 12 | 15 | 16 | 16 |
163163
avail | 61 | 67 | 76 | 82 | 91 | 86 |

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ MODULES_RELEASE := $(subst v,,$(GIT_CURRENT_TAG))
141141
MODULES_BUILD_DATE := $(shell git log -1 --format=%cd --date=short)
142142
ifeq ($(GIT_CURRENT_TAG),$(GIT_CURRENT_DESC))
143143
MODULES_BUILD :=
144-
else ifeq ($(GIT_CURRENT_BRANCH),master)
144+
else ifeq ($(GIT_CURRENT_BRANCH),main)
145145
MODULES_BUILD := +$(subst $(GIT_CURRENT_TAG)-,,$(GIT_CURRENT_DESC))
146146
else
147147
MODULES_BUILD := +$(GIT_CURRENT_BRANCH)$(subst $(GIT_CURRENT_TAG),,$(GIT_CURRENT_DESC))
@@ -168,7 +168,7 @@ MODULES_BUILD_REFS := $(subst $(comma),,$(MODULES_BUILD_REFS))
168168

169169
ifeq ($(filter v$(MODULES_RELEASE),$(MODULES_BUILD_REFS)),v$(MODULES_RELEASE))
170170
MODULES_BUILD :=
171-
else ifeq ($(filter master,$(MODULES_BUILD_REFS)),master)
171+
else ifeq ($(filter main,$(MODULES_BUILD_REFS)),main)
172172
MODULES_BUILD := +XX-g$(MODULES_BUILD_HASH)
173173
else ifeq ($(MODULES_BUILD_REFS),%D)
174174
MODULES_BUILD := +XX-g$(MODULES_BUILD_HASH)

NEWS.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ Modules 5.2.0 (not yet released)
140140
if :option:`--all` option is set.
141141
* Doc: ensure current user environment does not break logging system in
142142
:ref:`log-module-command` recipe. (fix issue #475)
143+
* Rename the default git branch from *master* to *main* to use inclusive
144+
terminology.
143145

144146
.. _Nagelfar: http://nagelfar.sourceforge.net/
145147
.. _ShellCheck: https://www.shellcheck.net/
@@ -397,7 +399,7 @@ Modules 5.1.0 (2022-04-30)
397399
* Mention tagging evaluation of a module, when tag list of an already loaded
398400
module is updated.
399401

400-
.. _Code of conduct: https://github.com/cea-hpc/modules/blob/master/CODE_OF_CONDUCT.md
402+
.. _Code of conduct: https://github.com/cea-hpc/modules/blob/main/CODE_OF_CONDUCT.md
401403
.. _codespell: https://github.com/codespell-project/codespell
402404
.. _Aspell: http://aspell.net/
403405

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# <img src="https://raw.githubusercontent.com/cea-hpc/modules/master/doc/img/modules_red.svg" height="180" alt="Modules"/>
1+
# <img src="https://raw.githubusercontent.com/cea-hpc/modules/main/doc/img/modules_red.svg" height="180" alt="Modules"/>
22

33
[![Linux Build Status](https://github.com/cea-hpc/modules/workflows/linux-tests/badge.svg)](https://github.com/cea-hpc/modules/actions?query=workflow:linux-tests)
44
[![Windows Build Status](https://github.com/cea-hpc/modules/workflows/windows-tests/badge.svg)](https://github.com/cea-hpc/modules/actions?query=workflow:windows-tests)
55
[![FreeBSD/OS X/Linux Build Status](https://api.cirrus-ci.com/github/cea-hpc/modules.svg)](https://cirrus-ci.com/github/cea-hpc/modules)
6-
[![Coverage Status](https://codecov.io/gh/cea-hpc/modules/branch/master/graph/badge.svg)](https://codecov.io/gh/cea-hpc/modules)
6+
[![Coverage Status](https://codecov.io/gh/cea-hpc/modules/branch/main/graph/badge.svg)](https://codecov.io/gh/cea-hpc/modules)
77
[![Documentation Status](https://readthedocs.org/projects/modules/badge/?version=latest)](https://modules.readthedocs.io/en/latest/?badge=latest)
88
[![Packaging status](https://repology.org/badge/tiny-repos/environment-modules.svg)](https://repology.org/metapackage/environment-modules/versions)
99
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/EnvModules.svg?style=social&label=Follow)](https://twitter.com/EnvModules)

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ if [ -e '.git' ]; then
984984
gitcurbranch=$(git rev-parse --abbrev-ref HEAD)
985985
if [ "$gitcurtag" = "$gitcurdesc" ]; then
986986
build=''
987-
elif [ "$gitcurbranch" = 'master' ]; then
987+
elif [ "$gitcurbranch" = 'main' ]; then
988988
build="+${gitcurdesc#${gitcurtag}-}"
989989
else
990990
build="+${gitcurbranch}${gitcurdesc#${gitcurtag}}"
@@ -995,7 +995,7 @@ elif [ "$build_hash" = '$Format:%h' ]; then
995995
# or compute it from these information as if working from git repository
996996
elif [[ " $build_refs " =~ " v$release " ]]; then
997997
build=''
998-
elif [[ " $build_refs " =~ " master " ]]; then
998+
elif [[ " $build_refs " =~ " main " ]]; then
999999
build="+XX-g$build_hash"
10001000
# %D placeholder may not be known by old version of git
10011001
elif [ "$build_refs" = "%D" ]; then

doc/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def get_version_release_from_git():
7373
else:
7474
branch = git_current_branch.rstrip()
7575
tags = git_current_desc.lstrip(git_current_tag + '-').rstrip()
76-
# workaround for RTD, where master branch is not detected
77-
if branch == 'master' or os.environ.get('READTHEDOCS', None) == 'True':
76+
# workaround for RTD, where main branch is not detected
77+
if branch == 'main' or os.environ.get('READTHEDOCS', None) == 'True':
7878
return version, version + '+' + tags
7979
else:
8080
return version, version + '+' + branch + '-' + tags

0 commit comments

Comments
 (0)