mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 10:19:54 +00:00
* Add dry-run flag * No traces on dry run * More refactoring * More updates to support bundle binary * More refactoring changes * Different approach of loading specs from URIs * Self review * More changes after review and testing * fix how we parse oci image uri * Remove unnecessary comment * Add missing file * Fix failing tests * Better error check for no collectors * Add default collectors when parsing support bundle specs * Add missed test fixture * Download specs with correct headers * Fix typo
52 lines
809 B
JavaScript
Executable File
52 lines
809 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const gri = require('gaze-run-interrupt');
|
|
|
|
if (!process.env.REMOTES) {
|
|
console.log("Usage: `REMOTES='user@h1.1.1.1,user@1.1.1.2' ./watchrsync.js`");
|
|
process.exit(1);
|
|
}
|
|
|
|
process.env.GOOS = 'linux';
|
|
process.env.GOARCH = 'amd64';
|
|
|
|
const binList = [
|
|
// 'bin/analyze',
|
|
// 'bin/preflight',
|
|
'bin/support-bundle',
|
|
// 'bin/collect'
|
|
]
|
|
|
|
const commands = [
|
|
// {
|
|
// command: 'rm',
|
|
// args: binList,
|
|
// },
|
|
{
|
|
command: 'make',
|
|
args: ['build'],
|
|
},
|
|
];
|
|
|
|
process.env.REMOTES.split(",").forEach(function (remote) {
|
|
commands.push({
|
|
command: 'rsync',
|
|
args: binList.concat(`${remote}:`),
|
|
});
|
|
});
|
|
|
|
commands.push({
|
|
command: "date",
|
|
args: [],
|
|
});
|
|
|
|
commands.push({
|
|
command: "echo",
|
|
args: ["synced"],
|
|
});
|
|
|
|
gri([
|
|
'cmd/**/*.go',
|
|
'pkg/**/*.go',
|
|
], commands);
|