reenabled whole workflow and made it build

This commit is contained in:
Philipp Häfelfinger 2019-04-06 22:48:11 +02:00
parent 564554ffb0
commit b99e990747

View File

@ -7,6 +7,9 @@ package app
import ( import (
"flag" "flag"
"git.haefelfinger.net/piwigo/PiwigoDirectoryUploader/internal/pkg/category"
"git.haefelfinger.net/piwigo/PiwigoDirectoryUploader/internal/pkg/images"
"git.haefelfinger.net/piwigo/PiwigoDirectoryUploader/internal/pkg/localFileStructure"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"os" "os"
) )
@ -32,43 +35,43 @@ func Run() {
logErrorAndExit(err, 2) logErrorAndExit(err, 2)
} }
//filesystemNodes, err := localFileStructure.ScanLocalFileStructure(context.localRootPath) filesystemNodes, err := localFileStructure.ScanLocalFileStructure(context.localRootPath)
//if err != nil { if err != nil {
// logErrorAndExit(err, 3) logErrorAndExit(err, 3)
//} }
//err = category.SynchronizeCategories(filesystemNodes, context.piwigo, context.dataStore) err = category.SynchronizeCategories(filesystemNodes, context.piwigo, context.dataStore)
//if err != nil { if err != nil {
// logErrorAndExit(err, 4) logErrorAndExit(err, 4)
//} }
//
//err = images.SynchronizeLocalImageMetadata(context.dataStore, filesystemNodes, categories, localFileStructure.CalculateFileCheckSums) err = images.SynchronizeLocalImageMetadata(context.dataStore, context.dataStore, filesystemNodes, localFileStructure.CalculateFileCheckSums)
//if err != nil { if err != nil {
// logErrorAndExit(err, 5) logErrorAndExit(err, 5)
//} }
//
//err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore) err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore)
//if err != nil { if err != nil {
// logErrorAndExit(err, 6) logErrorAndExit(err, 6)
//} }
//
//if *removeImages { if *removeImages {
// err = images.DeleteImages(context.piwigo, context.dataStore) err = images.DeleteImages(context.piwigo, context.dataStore)
// if err != nil { if err != nil {
// logErrorAndExit(err, 7) logErrorAndExit(err, 7)
// } }
//} else { } else {
// logrus.Info("The flag removeImages is disabled. Skipping...") logrus.Info("The flag removeImages is disabled. Skipping...")
//} }
//
//if !(*noUpload) { if !(*noUpload) {
// err = images.UploadImages(context.piwigo, context.dataStore) err = images.UploadImages(context.piwigo, context.dataStore)
// if err != nil { if err != nil {
// logErrorAndExit(err, 8) logErrorAndExit(err, 8)
// } }
//} else { } else {
// logrus.Warnln("Skipping upload of images as flag noUpload is set to true!") logrus.Warnln("Skipping upload of images as flag noUpload is set to true!")
//} }
_ = context.piwigo.Logout() _ = context.piwigo.Logout()
} }