Skip to content

Commit a38e4a0

Browse files
committed
routers/install.go: able to keep previous custom settings for 2nd time install
- .gopmfile: update all commits
1 parent def39d1 commit a38e4a0

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

.gopmfile

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@
22
path = github.com/gogits/gogs
33

44
[deps]
5-
github.com/beego/memcache = commit:2aea774416
6-
github.com/bradfitz/gomemcache =
5+
github.com/bradfitz/gomemcache = commit:72a68649ba
76
github.com/Unknwon/cae = commit:2e70a1351b
8-
github.com/Unknwon/com = commit:d9bcf409c8
7+
github.com/Unknwon/com = commit:188d690b1a
98
github.com/Unknwon/i18n = commit:1e88666229
10-
github.com/Unknwon/macaron =
11-
github.com/codegangsta/cli = commit:a14c5b47c7
12-
github.com/go-sql-driver/mysql = commit:04cf947760
13-
github.com/go-xorm/core = commit:e7882d8b00
14-
github.com/go-xorm/xorm = commit:dcc529b68a
9+
github.com/Unknwon/macaron = commit:e089393c3f
10+
github.com/codegangsta/cli = commit:6086d7927e
11+
github.com/go-sql-driver/mysql = commit:27633f0519
12+
github.com/go-xorm/core = commit:16cb27928f
13+
github.com/go-xorm/xorm = commit:f2d3be988e
1514
github.com/gogits/chardet = commit:2404f77725
1615
github.com/gogits/go-gogs-client = commit:92e76d616a
17-
github.com/lib/pq = commit:3e3efe51a0
18-
github.com/macaron-contrib/binding = commit:0fbe4b9707
19-
github.com/macaron-contrib/cache =
20-
github.com/macaron-contrib/captcha = commit:3567dc48b8
21-
github.com/macaron-contrib/csrf = commit:3ea14e7ee7
22-
github.com/macaron-contrib/i18n = commit:0ee0539c84
16+
github.com/lib/pq = commit:835d5eb08d
17+
github.com/macaron-contrib/binding = commit:dc739fabc3
18+
github.com/macaron-contrib/cache = commit:b68f6b448f
19+
github.com/macaron-contrib/captcha = commit:066c50c7eb
20+
github.com/macaron-contrib/csrf = commit:98ddf5a710
21+
github.com/macaron-contrib/i18n = commit:eeebd44f64
2322
github.com/macaron-contrib/oauth2 = commit:8f394c3629
24-
github.com/macaron-contrib/session =
25-
github.com/macaron-contrib/toolbox = commit:57127bcc89
26-
github.com/mattn/go-sqlite3 = commit:a80c27ba33
27-
github.com/microcosm-cc/bluemonday =
23+
github.com/macaron-contrib/session = commit:8e8d938b27
24+
github.com/macaron-contrib/toolbox = commit:acbfe36e16
25+
github.com/mattn/go-sqlite3 = commit:25d045f12a
26+
github.com/microcosm-cc/bluemonday = commit:fcd0f5074e
2827
github.com/nfnt/resize = commit:8f44931448
29-
github.com/russross/blackfriday = commit:05b8cefd6a
30-
github.com/shurcooL/go = commit:48293cbc7a
28+
github.com/russross/blackfriday = commit:77efab57b2
29+
github.com/shurcooL/go = commit:329f57438c
3130
golang.org/x/net =
3231
golang.org/x/text =
33-
gopkg.in/ini.v1 = commit:28ad8c408b
32+
gopkg.in/ini.v1 = commit:4febc4104c
3433
gopkg.in/redis.v2 = commit:e617904962
3534

3635
[res]

routers/install.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
189189

190190
// Save settings.
191191
cfg := ini.Empty()
192+
if com.IsFile(setting.CustomConf) {
193+
// Keeps custom settings if there is already something.
194+
if err := cfg.Append(setting.CustomConf); err != nil {
195+
log.Error(4, "Fail to load custom conf '%s': %v", setting.CustomConf, err)
196+
}
197+
}
192198
cfg.Section("database").Key("DB_TYPE").SetValue(models.DbCfg.Type)
193199
cfg.Section("database").Key("HOST").SetValue(models.DbCfg.Host)
194200
cfg.Section("database").Key("NAME").SetValue(models.DbCfg.Name)

0 commit comments

Comments
 (0)