The project aims to develop a GitHub repository auto-updater tool using 7-Zip or unzip.
npm i gh-updater
Here lists the usage of this tool.
If installed as node_modules/.bin/gh-updater
:
node_modules/.bin/gh-updater user/repository-branch [target_directory]
Or under Windows:
node_modules\.bin\gh-updater user/repository-branch [target_directory]
The commands above will extract user/repository-branch
in default target directory: repository-branch/
e.g.,
# install into gh-updater-master/
node_modules/.bin/gh-updater kanasimi/gh-updater-master
# install into **current directory**
node_modules/.bin/gh-updater kanasimi/gh-updater-master .
Testing GitHub.updater.node.js
:
node GitHub.updater.node.js user/repository-branch [target_directory]
const updater = require('gh-updater');
// to check version
updater.check_version('kanasimi/gh-updater-master', version_data => console.log(version_data) );
// to update
updater.update('kanasimi/gh-updater-master', '.');
Platform | support |
---|---|
Windows | ✔️ |
macOS | ✔️ |
UNIX, Linux | ✔️ |
In UNIX or macOS, thie update tool will use unzip to extract files. In Windows, the client must install 7-Zip first.
The update tool checks the latest commits of GitHub repository, NOT releases or npm package.
Contact us at GitHub.