update build
This commit is contained in:
@@ -7,8 +7,9 @@ import express = require('express');
|
||||
import http = require('http');
|
||||
import bsock = require('bsock');
|
||||
import { FrontblockCherryPicker } from "git-cherrypicker"
|
||||
import { basename } from "path"
|
||||
import { promises as fs } from "fs"
|
||||
import { GitUpdater } from "./GitUpdater";
|
||||
import * as git from "simple-git/promise"
|
||||
|
||||
const kfs = require("key-file-storage").default('kfs')
|
||||
|
||||
@@ -81,10 +82,23 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
return {httpPort: 8080}
|
||||
}
|
||||
|
||||
private async updateDashboard(){
|
||||
const dashboard = new GitUpdater("./static")
|
||||
const status = await dashboard.cloneRepo("https://gitea.frontblock.me/fb-dist/dashboard.git", true)
|
||||
console.log(status)
|
||||
}
|
||||
|
||||
private async updatePluginmanager(){
|
||||
const dashboard = new GitUpdater("./plugins/PluginManager")
|
||||
const status = await dashboard.cloneRepo("https://gitea.frontblock.me/fb-dist/pluginmanager.git", true)
|
||||
console.log(status)
|
||||
}
|
||||
|
||||
private async initialize(){
|
||||
await fs.mkdir("plugins/PluginManager", {recursive: true})
|
||||
await (new FrontblockCherryPicker("fb-dist/pluginmanager", "master", "Plugin.js")).write("plugins/PluginManager/Plugin.js")
|
||||
await (new FrontblockCherryPicker("fb-dist/pluginmanager", "master", "FrontendPlugin.js")).write("plugins/PluginManager/FrontendPlugin.js")
|
||||
await this.updateDashboard()
|
||||
|
||||
await this.updatePluginmanager()
|
||||
|
||||
let str = "../plugins/PluginManager/Plugin"
|
||||
const PM = await import(str)
|
||||
this.pm = new PM.default()
|
||||
|
||||
Reference in New Issue
Block a user