Merge pull request #108 from rokeller/develop

Generate same value of AppVersion regardless of where revel is run
This commit is contained in:
notzippy
2018-01-29 21:28:08 -08:00
committed by GitHub

View File

@@ -220,7 +220,7 @@ func getAppVersion() string {
if (err != nil && os.IsNotExist(err)) || !info.IsDir() {
return ""
}
gitCmd := exec.Command(gitPath, "--git-dir="+gitDir, "describe", "--always", "--dirty")
gitCmd := exec.Command(gitPath, "--git-dir="+gitDir, "--work-tree="+revel.BasePath, "describe", "--always", "--dirty")
revel.RevelLog.Debug("Exec:", "args", gitCmd.Args)
output, err := gitCmd.Output()