mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-05 10:32:56 +00:00
Auto-merge for PR #494 via VersionBot
Add a sync.js script to allow syncing a running supervisor container on a local device
This commit is contained in:
commit
a8e11b51a0
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
|||||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## v6.2.6 - 2017-08-29
|
||||||
|
|
||||||
|
* Add a sync.js script to allow syncing a running supervisor container on a local device #494 [Pablo Carranza Velez]
|
||||||
|
|
||||||
## v6.2.5 - 2017-08-28
|
## v6.2.5 - 2017-08-28
|
||||||
|
|
||||||
* Forward resume options #492 [Akis Kesoglou]
|
* Forward resume options #492 [Akis Kesoglou]
|
||||||
|
@ -126,6 +126,7 @@ WORKDIR /usr/src/app
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
g++ \
|
g++ \
|
||||||
|
git \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
make \
|
make \
|
||||||
python \
|
python \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "resin-supervisor",
|
"name": "resin-supervisor",
|
||||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||||
"version": "6.2.5",
|
"version": "6.2.6",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -46,9 +46,10 @@
|
|||||||
"pinejs-client": "^2.4.0",
|
"pinejs-client": "^2.4.0",
|
||||||
"pubnub": "^3.7.13",
|
"pubnub": "^3.7.13",
|
||||||
"request": "^2.51.0",
|
"request": "^2.51.0",
|
||||||
"resumable-request": "^1.0.0",
|
|
||||||
"resin-lint": "^1.3.1",
|
"resin-lint": "^1.3.1",
|
||||||
"resin-register-device": "^3.0.0",
|
"resin-register-device": "^3.0.0",
|
||||||
|
"resin-sync": "^9.1.0",
|
||||||
|
"resumable-request": "^1.0.0",
|
||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
"rwlock": "^5.0.0",
|
"rwlock": "^5.0.0",
|
||||||
"semver": "^5.3.0",
|
"semver": "^5.3.0",
|
||||||
|
23
sync.js
Executable file
23
sync.js
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
// Sync changes in the javascript code to a running supervisor on a device in the local network
|
||||||
|
//
|
||||||
|
// Usage:
|
||||||
|
// ./sync.js <device IP>
|
||||||
|
//
|
||||||
|
// The script will first build a non-optimized version of the js code and sync the resulting app.js
|
||||||
|
// onto the supervisor container at the specified IP. It will also restart the supervisor container.
|
||||||
|
// The device must be a development variant of Resin OS and the supervisor must be running.
|
||||||
|
|
||||||
|
doSync = require('resin-sync').sync('local-resin-os-device').sync;
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
deviceIp: process.argv[2],
|
||||||
|
baseDir: __dirname + '/dist',
|
||||||
|
destination: '/usr/src/app/dist',
|
||||||
|
appName: 'resin_supervisor',
|
||||||
|
skipGitignore: true,
|
||||||
|
before: 'npm install && npm run build-no-optimize'
|
||||||
|
};
|
||||||
|
|
||||||
|
doSync(opts);
|
Loading…
x
Reference in New Issue
Block a user