Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ignacio Corderi
committed
Oct 26, 2019
1 parent
fb13acc
commit b926dad
Showing
530 changed files
with
1,930 additions
and
1,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
go-filecoin | ||
!cmd/go-filecoin | ||
!internal/app/go-filecoin | ||
|
||
.task | ||
.idea | ||
*.coverprofile | ||
*.out | ||
*.so | ||
.idea | ||
gengen/gengen | ||
gengen/gensetup | ||
|
||
fixtures/test | ||
!fixtures/test/.gitkeep | ||
fixtures/live | ||
!fixtures/live/.gitkeep | ||
|
||
// Tools | ||
gengen/gengen | ||
gengen/gensetup | ||
tools/fast/bin/localnet | ||
tools/faucet/faucet | ||
tools/aggregator/aggregator | ||
tools/genesis-file-server/genesis-file-server | ||
tools/migration/go-filecoin-migrate | ||
tools/prerelease-tool/prerelease-tool | ||
|
||
**/paramcache | ||
**/*.h | ||
**/*.a | ||
**/*.pc | ||
|
||
// IDE (vscode) | ||
.vscode | ||
.vscode | ||
debug.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package flags | ||
|
||
// GitCommit is the current git commit, this is injected through ldflags. | ||
var GitCommit string | ||
|
||
// GitRoot is the git root, this is injected through ldflags. | ||
var GitRoot string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package helpers | ||
|
||
import ( | ||
"os/exec" | ||
"strings" | ||
) | ||
|
||
// GetGitRoot return the project root joined with any path fragments | ||
func GetGitRoot() string { | ||
cmd := exec.Command("git", "rev-parse", "--show-toplevel") | ||
out, err := cmd.CombinedOutput() | ||
if err != nil { | ||
panic("could not find git root") | ||
} | ||
|
||
return strings.Trim(string(out), "\n") | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
util/version/version_test.go → build/internal/version/version_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package project | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/filecoin-project/go-filecoin/build/flags" | ||
"github.com/filecoin-project/go-filecoin/build/internal/helpers" | ||
) | ||
|
||
// Root return the project root joined with any path fragments | ||
func Root(paths ...string) string { | ||
if flags.GitRoot == "" { | ||
// load the root if flag not present | ||
// Note: in some environments (i.e. IDE's) it wont be present | ||
flags.GitRoot = helpers.GetGitRoot() | ||
} | ||
allPaths := append([]string{flags.GitRoot}, paths...) | ||
return filepath.Join(allPaths...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.