Replace Gogs with Gitea (#520)
This commit is contained in:
parent
f686a32eac
commit
331316894e
8 changed files with 29 additions and 29 deletions
|
@ -141,11 +141,11 @@ func NewRepoContext() {
|
|||
|
||||
log.Info("Git Version: %s", gitVer)
|
||||
if version.Compare("1.7.1", gitVer, ">") {
|
||||
log.Fatal(4, "Gogs requires Git version greater or equal to 1.7.1")
|
||||
log.Fatal(4, "Gitea requires Git version greater or equal to 1.7.1")
|
||||
}
|
||||
|
||||
// Git requires setting user.name and user.email in order to commit changes.
|
||||
for configKey, defaultValue := range map[string]string{"user.name": "Gogs", "user.email": "gogs@fake.local"} {
|
||||
for configKey, defaultValue := range map[string]string{"user.name": "Gitea", "user.email": "gitea@fake.local"} {
|
||||
if stdout, stderr, err := process.Exec("NewRepoContext(get setting)", "git", "config", "--get", configKey); err != nil || strings.TrimSpace(stdout) == "" {
|
||||
// ExitError indicates this config is not set
|
||||
if _, ok := err.(*exec.ExitError); ok || strings.TrimSpace(stdout) == "" {
|
||||
|
@ -926,7 +926,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts C
|
|||
return fmt.Errorf("createUpdateHook: %v", err)
|
||||
}
|
||||
|
||||
tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))
|
||||
tmpDir := filepath.Join(os.TempDir(), "gitea-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))
|
||||
|
||||
// Initialize repository according to user's choice.
|
||||
if opts.AutoInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue