1
0
mirror of https://github.com/erlang/rebar3.git synced 2025-04-19 02:04:00 +03:00

switch default branch to main

This commit is contained in:
Tristan Sloughter 2022-01-01 06:54:01 -07:00
parent 174fd90701
commit fd2f9b553a
No known key found for this signature in database
GPG Key ID: 6BC93CF674613287
8 changed files with 18 additions and 16 deletions

View File

@ -3,10 +3,10 @@ name: Common Test
on:
pull_request:
branches:
- 'master'
- 'main'
push:
branches:
- 'master'
- 'main'
jobs:
linux:

View File

@ -3,11 +3,11 @@ name: Nightly
on:
push:
branches:
- 'master'
- 'main'
jobs:
build:
name: Publish escript for every merge to master
name: Publish escript for every merge to main
runs-on: ubuntu-18.04
steps:

View File

@ -3,10 +3,10 @@ name: Shell tests
on:
pull_request:
branches:
- 'master'
- 'main'
push:
branches:
- 'master'
- 'main'
jobs:
shelltests:

View File

@ -307,7 +307,7 @@ before a final rebase to merge things. Do send edits as individual commits
to allow for gradual and partial reviews to be done by reviewers. Once the +1s
are given, rebasing is appreciated but not mandatory.
Please work in feature branches, and do not commit to `master` in your fork.
Please work in feature branches, and do not commit to `main` in your fork.
Provide a clean branch without merge commits.

View File

@ -86,10 +86,10 @@
{deps, [
app_name, % latest version of package
{rebar, "1.0.0"}, % version 1.0.0 of a package
{rebar, % git, master branch of app, explicit
{git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
{rebar, % git, main branch of app, explicit
{git, "git://github.com/rebar/rebar.git", {branch, "main"}}},
{rebar, % git, over HTTPS
{git, "https://github.com/rebar/rebar.git", {branch, "master"}}},
{git, "https://github.com/rebar/rebar.git", {branch, "main"}}},
{rebar, % git, tag
{git, "https://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
{rebar, % git, specific reference/hash
@ -97,14 +97,14 @@
{rebar, % mercurial is also supported
{hg, "https://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
%% Alternative formats, backwards compatible declarations
{rebar, % implicit master, will warn recommending explicit branch
{rebar, % implicit main, will warn recommending explicit branch
{git, "git://github.com/rebar/rebar.git"}},
{rebar, "1.0.*", % regex version check, ignored
{git, "git://github.com/rebar/rebar.git"}},
{rebar, "1.0.*", % literal branch/ref/tag, will warn for explicit reference
{git, "git://github.com/rebar/rebar.git", "Rev"}},
{rebar, ".*", % 'raw' dependency, argument ignored
{git, "git://github.com/rebar/rebar.git", {branch, "master"}},
{git, "git://github.com/rebar/rebar.git", {branch, "main"}},
[raw]}
]}.

View File

@ -80,6 +80,8 @@ needs_update_(Dir, {git, Url, {branch, Branch}}) ->
[{cd, Dir}]),
?DEBUG("Checking git branch ~ts for updates", [Branch]),
not ((Current =:= []) andalso compare_url(Dir, Url));
needs_update_(Dir, {git, Url, "main"}) ->
needs_update_(Dir, {git, Url, {branch, "main"}});
needs_update_(Dir, {git, Url, "master"}) ->
needs_update_(Dir, {git, Url, {branch, "master"}});
needs_update_(Dir, {git, _, Ref}) ->

View File

@ -288,7 +288,7 @@ top_override(Config) ->
rebar_test_utils:create_config(
SubAppsDir2,
[{deps, [{list_to_atom(Name1),
{git, "https://example.org", {branch, "master"}}}]}]
{git, "https://example.org", {branch, "main"}}}]}]
),
rebar_test_utils:run_and_check(
Config, [], ["compile"],

View File

@ -166,13 +166,13 @@ create_random_vsn() ->
expand_deps(_, []) -> [];
expand_deps(git_subdir, [{Name, Deps} | Rest]) ->
Dep = {Name, {git_subdir, "https://example.org/user/"++Name++".git", {branch, "master"}, filename:join("appsubdir", Name)}},
Dep = {Name, {git_subdir, "https://example.org/user/"++Name++".git", {branch, "main"}, filename:join("appsubdir", Name)}},
[{Dep, expand_deps(git_subdir, Deps)} | expand_deps(git_subdir, Rest)];
expand_deps(git_subdir, [{Name, Vsn, Deps} | Rest]) ->
Dep = {Name, Vsn, {git_subdir, "https://example.org/user/"++Name++".git", {tag, Vsn}, filename:join("appsubdir", Name)}},
[{Dep, expand_deps(git_subdir, Deps)} | expand_deps(git_subdir, Rest)];
expand_deps(git, [{Name, Deps} | Rest]) ->
Dep = {Name, ".*", {git, "https://example.org/user/"++Name++".git", "master"}},
Dep = {Name, ".*", {git, "https://example.org/user/"++Name++".git", "main"}},
[{Dep, expand_deps(git, Deps)} | expand_deps(git, Rest)];
expand_deps(git, [{Name, Vsn, Deps} | Rest]) ->
Dep = {Name, Vsn, {git, "https://example.org/user/"++Name++".git", {tag, Vsn}}},
@ -187,7 +187,7 @@ expand_deps(mixed, [{Name, Deps} | Rest]) ->
Dep = if hd(Name) >= $a, hd(Name) =< $z ->
{pkg, rebar_string:uppercase(Name), "0.0.0", undefined, undefined}
; hd(Name) >= $A, hd(Name) =< $Z ->
{Name, ".*", {git, "https://example.org/user/"++Name++".git", "master"}}
{Name, ".*", {git, "https://example.org/user/"++Name++".git", "main"}}
end,
[{Dep, expand_deps(mixed, Deps)} | expand_deps(mixed, Rest)];
expand_deps(mixed, [{Name, Vsn, Deps} | Rest]) ->