Skip to content

Commit

Permalink
Allow build even without git set up.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinChartier committed Jul 3, 2019
1 parent 36f8a99 commit 047434b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bridge/git/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func GetGitRoot(dir string) (string, error) {
func GetCurrentTreeHash(rootDir string, unstagedFiles ...string) (string, error) {
rootDir, err := GetGitRoot(rootDir)
if err != nil {
return "", err
return "setup-git-for-unique-token", nil
}

tmpindex, err := ioutil.TempFile("", "sanicindex")
Expand All @@ -68,7 +68,7 @@ func GetCurrentTreeHash(rootDir string, unstagedFiles ...string) (string, error)
//See http://web.archive.org/web/20190606210911/https://stackoverflow.com/questions/23816330/compute-git-hash-of-all-uncommitted-code
currIndexData, err := ioutil.ReadFile(rootDir + "/.git/index")
if err != nil {
return "", err
return "commit-for-unique-token", nil
}
_, err = tmpindex.Write(currIndexData)
if err != nil {
Expand Down

0 comments on commit 047434b

Please sign in to comment.