NPM test
This commit is contained in:
parent
fca2d471b1
commit
ff605249ad
16
myvc-pull.js
16
myvc-pull.js
|
@ -2,11 +2,27 @@
|
||||||
const MyVC = require('./myvc');
|
const MyVC = require('./myvc');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const ejs = require('ejs');
|
const ejs = require('ejs');
|
||||||
|
const nodegit = require('nodegit');
|
||||||
|
|
||||||
class Pull {
|
class Pull {
|
||||||
async run(myvc, opts) {
|
async run(myvc, opts) {
|
||||||
const conn = await myvc.dbConnect();
|
const conn = await myvc.dbConnect();
|
||||||
|
/*
|
||||||
|
const version = await myvc.fetchDbVersion();
|
||||||
|
let repo;
|
||||||
|
|
||||||
|
if (version && version.gitCommit) {
|
||||||
|
console.log(version);
|
||||||
|
repo = await nodegit.Repository.open(opts.workspace);
|
||||||
|
const commit = await repo.getCommit(version.gitCommit);
|
||||||
|
const now = parseInt(new Date().getTime() / 1000);
|
||||||
|
const branch = await nodegit.Branch.create(repo,
|
||||||
|
`myvc_${now}`, commit, () => {});
|
||||||
|
await repo.checkoutBranch(branch);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
*/
|
||||||
for (const exporter of exporters)
|
for (const exporter of exporters)
|
||||||
await exporter.init();
|
await exporter.init();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "myvc",
|
"name": "myvc",
|
||||||
"version": "1.1.7",
|
"version": "1.1.9",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL Version Control",
|
"description": "MySQL Version Control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue