fix: use explicit monitor repository url
This commit is contained in:
@@ -30,6 +30,7 @@ const PLUGIN_NAME = 'harbor-forge';
|
||||
const OLD_PLUGIN_NAME = 'harborforge-monitor';
|
||||
const PLUGIN_SRC_DIR = join(__dirname, 'plugin');
|
||||
const SKILLS_SRC_DIR = join(__dirname, 'skills');
|
||||
const MONITOR_REPO_URL = 'https://git.hangman-lab.top/zhi/HarborForge.Monitor.git';
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const options = {
|
||||
@@ -182,15 +183,12 @@ async function build() {
|
||||
|
||||
function installManagedMonitor(openclawPath) {
|
||||
if (options.installMonitor !== 'yes') return null;
|
||||
const projectRoot = resolve(__dirname, '..');
|
||||
const gitRoot = exec('git config --get remote.origin.url', { cwd: projectRoot, silent: true }).trim();
|
||||
const monitorRepo = gitRoot.replace(/HarborForge\.OpenclawPlugin(\.git)?$/, 'HarborForge.Monitor.git');
|
||||
const tmpDir = join('/tmp', `harborforge-monitor-${Date.now()}`);
|
||||
const monitorDestDir = join(openclawPath, 'plugins', PLUGIN_NAME, 'bin');
|
||||
const binaryPath = join(monitorDestDir, 'HarborForge.Monitor');
|
||||
mkdirSync(monitorDestDir, { recursive: true });
|
||||
try {
|
||||
exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(monitorRepo)} ${shellEscape(tmpDir)}`, { silent: !options.verbose });
|
||||
exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(MONITOR_REPO_URL)} ${shellEscape(tmpDir)}`, { silent: !options.verbose });
|
||||
exec(`go build -o ${shellEscape(binaryPath)} ./cmd/harborforge-monitor`, { cwd: tmpDir, silent: !options.verbose });
|
||||
chmodSync(binaryPath, 0o755);
|
||||
logOk(`Managed monitor installed → ${binaryPath} (branch hint: ${options.monitorBranch})`);
|
||||
|
||||
Reference in New Issue
Block a user