Skip to content

Commit e401536

Browse files
committed
dockerignore, internal/build: forward correct git folder
1 parent cb8bbe7 commit e401536

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.dockerignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
**/.git
2-
/.git
3-
!/.git/HEAD
4-
!/.git/refs/heads
2+
.git
3+
!.git/HEAD
4+
!.git/refs/heads
55
**/*_test.go
66

77
build/_workspace

internal/build/env.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ func Env() Environment {
8282
// LocalEnv returns build environment metadata gathered from git.
8383
func LocalEnv() Environment {
8484
env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"})
85-
head := ReadGitFile("HEAD")
85+
86+
head := readGitFile("HEAD")
8687
if splits := strings.Split(head, " "); len(splits) == 2 {
8788
head = splits[1]
8889
} else {
8990
return env
9091
}
9192
if env.Commit == "" {
92-
env.Commit = ReadGitFile(head)
93+
env.Commit = readGitFile(head)
9394
}
9495
if env.Branch == "" {
9596
if head != "HEAD" {

internal/build/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ func RunGit(args ...string) string {
8989
return strings.TrimSpace(stdout.String())
9090
}
9191

92-
// ReadGitFile returns content of file in .git directory.
93-
func ReadGitFile(file string) string {
92+
// readGitFile returns content of file in .git directory.
93+
func readGitFile(file string) string {
9494
content, err := ioutil.ReadFile(path.Join(".git", file))
9595
if err != nil {
9696
return ""

0 commit comments

Comments
 (0)