mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
added dockerfile and other stuff
This commit is contained in:
@@ -35,7 +35,8 @@ type KGPZ struct {
|
||||
|
||||
func (k *KGPZ) Init() {
|
||||
if k.Config.Debug {
|
||||
// NOTE: validity checks for poor people, speeding up dev mode:
|
||||
// NOTE: validity checks done wrong, but speeding up dev mode:
|
||||
// In dev mode we expect the folder to be a valid repository
|
||||
if _, err := os.Stat(k.Config.FolderPath); err != nil {
|
||||
k.initRepo()
|
||||
} else {
|
||||
@@ -171,8 +172,11 @@ func (k *KGPZ) Pull() {
|
||||
|
||||
func (k *KGPZ) initRepo() {
|
||||
gp, err := providers.NewGitProvider(k.Config.Config.GitURL, k.Config.Config.FolderPath, k.Config.Config.GitBranch)
|
||||
// TODO: what to do if the repo can't be initialized?
|
||||
// What to do if the data can't be read?
|
||||
// Handle in Serialize --> it musttry to initialize the repository if files are missing.
|
||||
if err != nil {
|
||||
logging.ObjErr(&gp, err, "Error creating GitProvider")
|
||||
logging.Error(err, "Error initializing GitProvider")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user