admin: Check all theme/exercice attribute are in sync with repo
This commit is contained in:
parent
5e262b75a3
commit
74f388a2b9
18 changed files with 813 additions and 137 deletions
|
|
@ -199,10 +199,10 @@ func main() {
|
|||
}
|
||||
log.Println("Using", sync.GlobalImporter.Kind())
|
||||
|
||||
// Update distributed challenge.json
|
||||
if _, err := os.Stat(path.Join(settings.SettingsDir, settings.ChallengeFile)); os.IsNotExist(err) {
|
||||
challengeinfo, err := sync.GetFileContent(sync.GlobalImporter, settings.ChallengeFile)
|
||||
if err == nil {
|
||||
challengeinfo, err := sync.GetFileContent(sync.GlobalImporter, settings.ChallengeFile)
|
||||
if err == nil {
|
||||
// Initial distribution of challenge.json
|
||||
if _, err := os.Stat(path.Join(settings.SettingsDir, settings.ChallengeFile)); os.IsNotExist(err) {
|
||||
if fd, err := os.Create(path.Join(settings.SettingsDir, settings.ChallengeFile)); err != nil {
|
||||
log.Fatal("Unable to open SETTINGS/challenge.json:", err)
|
||||
} else {
|
||||
|
|
@ -213,6 +213,10 @@ func main() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ci, err := settings.ReadChallengeInfo(challengeinfo); err == nil {
|
||||
fic.StandaloneExercicesTheme.Authors = ci.Authors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue