Uploads model + watcher

This commit is contained in:
NGPixel
2016-10-09 01:26:25 -04:00
parent 819d4ad346
commit 99a07d342c
12 changed files with 367 additions and 119 deletions

View File

@@ -235,6 +235,23 @@ module.exports = {
return true;
})
},
/**
* Commits uploads changes.
*
* @return {Promise} Resolve on commit success
*/
commitUploads() {
let self = this;
return self._git.add('uploads').then(() => {
return self._git.commit("Uploads repository sync").catch((err) => {
if(_.includes(err.stdout, 'nothing to commit')) { return true; }
});
});
}
};