mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
Use main as new name for default git branch
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
name: Differential ShellCheck
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
2
.github/workflows/lint_tests.yaml
vendored
2
.github/workflows/lint_tests.yaml
vendored
@@ -3,7 +3,7 @@ name: lint-tests
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- c-master
|
||||
- c-main
|
||||
- c-3.2
|
||||
pull_request:
|
||||
|
||||
|
||||
2
.github/workflows/linux_tests.yaml
vendored
2
.github/workflows/linux_tests.yaml
vendored
@@ -3,7 +3,7 @@ name: linux-tests
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- c-master
|
||||
- c-main
|
||||
- c-3.2
|
||||
pull_request:
|
||||
|
||||
|
||||
2
.github/workflows/windows_tests.yaml
vendored
2
.github/workflows/windows_tests.yaml
vendored
@@ -3,7 +3,7 @@ name: windows-tests
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- c-master
|
||||
- c-main
|
||||
- c-3.2
|
||||
pull_request:
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ releases and current branch are built. Different tests are run against each
|
||||
version and the execution time of each test is reported in millisecond::
|
||||
|
||||
$ script/mb
|
||||
| v4.1.4 | v4.3.1 | v4.5.3 | v4.7.1 | v5.1.1 | master |
|
||||
| v4.1.4 | v4.3.1 | v4.5.3 | v4.7.1 | v5.1.1 | main |
|
||||
----------+----------+----------+----------+----------+----------+----------+
|
||||
help | 9 | 12 | 12 | 15 | 16 | 16 |
|
||||
avail | 61 | 67 | 76 | 82 | 91 | 86 |
|
||||
|
||||
4
Makefile
4
Makefile
@@ -141,7 +141,7 @@ MODULES_RELEASE := $(subst v,,$(GIT_CURRENT_TAG))
|
||||
MODULES_BUILD_DATE := $(shell git log -1 --format=%cd --date=short)
|
||||
ifeq ($(GIT_CURRENT_TAG),$(GIT_CURRENT_DESC))
|
||||
MODULES_BUILD :=
|
||||
else ifeq ($(GIT_CURRENT_BRANCH),master)
|
||||
else ifeq ($(GIT_CURRENT_BRANCH),main)
|
||||
MODULES_BUILD := +$(subst $(GIT_CURRENT_TAG)-,,$(GIT_CURRENT_DESC))
|
||||
else
|
||||
MODULES_BUILD := +$(GIT_CURRENT_BRANCH)$(subst $(GIT_CURRENT_TAG),,$(GIT_CURRENT_DESC))
|
||||
@@ -168,7 +168,7 @@ MODULES_BUILD_REFS := $(subst $(comma),,$(MODULES_BUILD_REFS))
|
||||
|
||||
ifeq ($(filter v$(MODULES_RELEASE),$(MODULES_BUILD_REFS)),v$(MODULES_RELEASE))
|
||||
MODULES_BUILD :=
|
||||
else ifeq ($(filter master,$(MODULES_BUILD_REFS)),master)
|
||||
else ifeq ($(filter main,$(MODULES_BUILD_REFS)),main)
|
||||
MODULES_BUILD := +XX-g$(MODULES_BUILD_HASH)
|
||||
else ifeq ($(MODULES_BUILD_REFS),%D)
|
||||
MODULES_BUILD := +XX-g$(MODULES_BUILD_HASH)
|
||||
|
||||
4
NEWS.rst
4
NEWS.rst
@@ -140,6 +140,8 @@ Modules 5.2.0 (not yet released)
|
||||
if :option:`--all` option is set.
|
||||
* Doc: ensure current user environment does not break logging system in
|
||||
:ref:`log-module-command` recipe. (fix issue #475)
|
||||
* Rename the default git branch from *master* to *main* to use inclusive
|
||||
terminology.
|
||||
|
||||
.. _Nagelfar: http://nagelfar.sourceforge.net/
|
||||
.. _ShellCheck: https://www.shellcheck.net/
|
||||
@@ -397,7 +399,7 @@ Modules 5.1.0 (2022-04-30)
|
||||
* Mention tagging evaluation of a module, when tag list of an already loaded
|
||||
module is updated.
|
||||
|
||||
.. _Code of conduct: https://github.com/cea-hpc/modules/blob/master/CODE_OF_CONDUCT.md
|
||||
.. _Code of conduct: https://github.com/cea-hpc/modules/blob/main/CODE_OF_CONDUCT.md
|
||||
.. _codespell: https://github.com/codespell-project/codespell
|
||||
.. _Aspell: http://aspell.net/
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# <img src="https://raw.githubusercontent.com/cea-hpc/modules/master/doc/img/modules_red.svg" height="180" alt="Modules"/>
|
||||
# <img src="https://raw.githubusercontent.com/cea-hpc/modules/main/doc/img/modules_red.svg" height="180" alt="Modules"/>
|
||||
|
||||
[](https://github.com/cea-hpc/modules/actions?query=workflow:linux-tests)
|
||||
[](https://github.com/cea-hpc/modules/actions?query=workflow:windows-tests)
|
||||
[](https://cirrus-ci.com/github/cea-hpc/modules)
|
||||
[](https://codecov.io/gh/cea-hpc/modules)
|
||||
[](https://codecov.io/gh/cea-hpc/modules)
|
||||
[](https://modules.readthedocs.io/en/latest/?badge=latest)
|
||||
[](https://repology.org/metapackage/environment-modules/versions)
|
||||
[](https://twitter.com/EnvModules)
|
||||
|
||||
4
configure
vendored
4
configure
vendored
@@ -984,7 +984,7 @@ if [ -e '.git' ]; then
|
||||
gitcurbranch=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ "$gitcurtag" = "$gitcurdesc" ]; then
|
||||
build=''
|
||||
elif [ "$gitcurbranch" = 'master' ]; then
|
||||
elif [ "$gitcurbranch" = 'main' ]; then
|
||||
build="+${gitcurdesc#${gitcurtag}-}"
|
||||
else
|
||||
build="+${gitcurbranch}${gitcurdesc#${gitcurtag}}"
|
||||
@@ -995,7 +995,7 @@ elif [ "$build_hash" = '$Format:%h' ]; then
|
||||
# or compute it from these information as if working from git repository
|
||||
elif [[ " $build_refs " =~ " v$release " ]]; then
|
||||
build=''
|
||||
elif [[ " $build_refs " =~ " master " ]]; then
|
||||
elif [[ " $build_refs " =~ " main " ]]; then
|
||||
build="+XX-g$build_hash"
|
||||
# %D placeholder may not be known by old version of git
|
||||
elif [ "$build_refs" = "%D" ]; then
|
||||
|
||||
@@ -73,8 +73,8 @@ def get_version_release_from_git():
|
||||
else:
|
||||
branch = git_current_branch.rstrip()
|
||||
tags = git_current_desc.lstrip(git_current_tag + '-').rstrip()
|
||||
# workaround for RTD, where master branch is not detected
|
||||
if branch == 'master' or os.environ.get('READTHEDOCS', None) == 'True':
|
||||
# workaround for RTD, where main branch is not detected
|
||||
if branch == 'main' or os.environ.get('READTHEDOCS', None) == 'True':
|
||||
return version, version + '+' + tags
|
||||
else:
|
||||
return version, version + '+' + branch + '-' + tags
|
||||
|
||||
@@ -87,7 +87,7 @@ Copy the ``localmodules`` file from the Modules source tree to your
|
||||
repo::
|
||||
|
||||
cd /home/modules/modulefiles
|
||||
curl --output localmodules https://raw.githubusercontent.com/cea-hpc/modules/master/doc/example/modulefiles-in-git/modulefiles/localmodules
|
||||
curl --output localmodules https://raw.githubusercontent.com/cea-hpc/modules/main/doc/example/modulefiles-in-git/modulefiles/localmodules
|
||||
|
||||
Edit paths in the top of ``localmodules``, if your installation
|
||||
differs from the assumptions, then::
|
||||
|
||||
@@ -91,7 +91,7 @@ set logfid [open $logfile w]
|
||||
|
||||
# get current branch
|
||||
set relbranch [exec git branch --show-current]
|
||||
if {[regexp {^(master|v\d+.\d+.x)$} $relbranch]} {
|
||||
if {[regexp {^(main|v\d+.\d+.x)$} $relbranch]} {
|
||||
reportInfo "Found branch '$relbranch'"
|
||||
} else {
|
||||
error "git branch '$relbranch' is not a valid release branch"
|
||||
|
||||
@@ -114,7 +114,7 @@ set logfid [open $logfile w]
|
||||
|
||||
# get current branch
|
||||
set relbranch [exec git branch --show-current]
|
||||
if {[regexp {^(master|v\d+.\d+.x)$} $relbranch]} {
|
||||
if {[regexp {^(main|v\d+.\d+.x)$} $relbranch]} {
|
||||
reportInfo "Found branch '$relbranch'"
|
||||
} else {
|
||||
error "git branch '$relbranch' is not a valid release branch"
|
||||
|
||||
Reference in New Issue
Block a user