mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
* ignore some more stuff
* watchrsync make command like kurl project
* document watchrsync
* the actual watchrsync script
* dont need these for npm dependencies
* Revert "dont need these for npm dependencies"
This reverts commit bdb4e62c38.
* install gaze-run-interrupt with make
* watchrsync instructions
58 lines
898 B
JavaScript
Executable File
58 lines
898 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 makeList = [
|
|
// 'analyze',
|
|
// 'preflight',
|
|
'support-bundle',
|
|
// 'collect'
|
|
]
|
|
|
|
const commands = [
|
|
// {
|
|
// command: 'rm',
|
|
// args: binList,
|
|
// },
|
|
{
|
|
command: 'make',
|
|
args: makeList,
|
|
},
|
|
];
|
|
|
|
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);
|