Browse Source

add more README vars

pull/1551/head
Unknwon 9 years ago
parent
commit
11ce720f9f
  1. 10
      models/repo.go

10
models/repo.go

@ -530,9 +530,15 @@ func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRep
return fmt.Errorf("getRepoInitFile[%s]: %v", opts.Readme, err)
}
cloneLink, err := repo.CloneLink()
if err != nil {
return fmt.Errorf("CloneLink: %v", err)
}
match := map[string]string{
"Name": repo.Name,
"Description": repo.Description,
"Name": repo.Name,
"Description": repo.Description,
"CloneURL.SSH": cloneLink.SSH,
"CloneURL.HTTPS": cloneLink.HTTPS,
}
if err = ioutil.WriteFile(filepath.Join(tmpDir, "README.md"),
[]byte(com.Expand(string(data), match)), 0644); err != nil {

Loading…
Cancel
Save