Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
364e485e
Unverified
Commit
364e485e
authored
Jul 22, 2019
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: update license exclusions, case insensitive author list
parent
57fc1d21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
update-license.go
build/update-license.go
+18
-5
No files found.
build/update-license.go
View file @
364e485e
...
@@ -62,16 +62,22 @@ var (
...
@@ -62,16 +62,22 @@ var (
skipPrefixes
=
[]
string
{
skipPrefixes
=
[]
string
{
// boring stuff
// boring stuff
"vendor/"
,
"tests/testdata/"
,
"build/"
,
"vendor/"
,
"tests/testdata/"
,
"build/"
,
// don't relicense vendored sources
// don't relicense vendored sources
"cmd/internal/browser"
,
"cmd/internal/browser"
,
"common/bitutil/bitutil"
,
"common/prque/"
,
"consensus/ethash/xor.go"
,
"consensus/ethash/xor.go"
,
"crypto/bn256/"
,
"crypto/bn256/"
,
"crypto/ecies/"
,
"crypto/ecies/"
,
"crypto/secp256k1/curve.go"
,
"graphql/graphiql.go"
,
"crypto/sha3/"
,
"internal/jsre/deps"
,
"internal/jsre/deps"
,
"log/"
,
"log/"
,
"common/bitutil/bitutil"
,
"metrics/"
,
"signer/rules/deps"
,
// skip special licenses
"crypto/secp256k1"
,
// Relicensed to BSD-3 via https://github.com/ethereum/go-ethereum/pull/17225
}
}
// paths with this prefix are licensed as GPL. all other files are LGPL.
// paths with this prefix are licensed as GPL. all other files are LGPL.
...
@@ -144,6 +150,13 @@ func (i info) gpl() bool {
...
@@ -144,6 +150,13 @@ func (i info) gpl() bool {
return
false
return
false
}
}
// authors implements the sort.Interface for strings in case-insensitive mode.
type
authors
[]
string
func
(
as
authors
)
Len
()
int
{
return
len
(
as
)
}
func
(
as
authors
)
Less
(
i
,
j
int
)
bool
{
return
strings
.
ToLower
(
as
[
i
])
<
strings
.
ToLower
(
as
[
j
])
}
func
(
as
authors
)
Swap
(
i
,
j
int
)
{
as
[
i
],
as
[
j
]
=
as
[
j
],
as
[
i
]
}
func
main
()
{
func
main
()
{
var
(
var
(
files
=
getFiles
()
files
=
getFiles
()
...
@@ -263,7 +276,7 @@ func mailmapLookup(authors []string) []string {
...
@@ -263,7 +276,7 @@ func mailmapLookup(authors []string) []string {
func
writeAuthors
(
files
[]
string
)
{
func
writeAuthors
(
files
[]
string
)
{
merge
:=
make
(
map
[
string
]
bool
)
merge
:=
make
(
map
[
string
]
bool
)
// Add authors that Git reports as contributor
x
s.
// Add authors that Git reports as contributors.
// This is the primary source of author information.
// This is the primary source of author information.
for
_
,
a
:=
range
gitAuthors
(
files
)
{
for
_
,
a
:=
range
gitAuthors
(
files
)
{
merge
[
a
]
=
true
merge
[
a
]
=
true
...
@@ -279,7 +292,7 @@ func writeAuthors(files []string) {
...
@@ -279,7 +292,7 @@ func writeAuthors(files []string) {
for
a
:=
range
merge
{
for
a
:=
range
merge
{
result
=
append
(
result
,
a
)
result
=
append
(
result
,
a
)
}
}
sort
.
S
trings
(
result
)
sort
.
S
ort
(
authors
(
result
)
)
content
:=
new
(
bytes
.
Buffer
)
content
:=
new
(
bytes
.
Buffer
)
content
.
WriteString
(
authorsFileHeader
)
content
.
WriteString
(
authorsFileHeader
)
for
_
,
a
:=
range
result
{
for
_
,
a
:=
range
result
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment