mirror of
https://github.com/S2-/gitlit
synced 2025-08-03 12:50:04 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
1fe4d0d90c
|
|||
9873246826
|
|||
b8a94f650f
|
|||
e97a5c1fc2
|
|||
3d020a3ddd
|
|||
8765f99f19
|
@@ -46,7 +46,7 @@ npm run dist
|
|||||||
```
|
```
|
||||||
|
|
||||||
## notes
|
## notes
|
||||||
Since version 2.0.1 the app auto updates itself.
|
Since version 2.0.1 the app auto updates itself using the [github-app-updater](https://www.npmjs.com/package/github-app-updater).
|
||||||
|
|
||||||
## license
|
## license
|
||||||
|
|
||||||
|
52
app/main.js
52
app/main.js
@@ -15,35 +15,37 @@ let repoDir = path.resolve(path.normalize(args._.join(' ')));
|
|||||||
let repoRootDir = repoDir;
|
let repoRootDir = repoDir;
|
||||||
|
|
||||||
//auto update stuff
|
//auto update stuff
|
||||||
setTimeout(() => {
|
if (process.platform === 'win32') {
|
||||||
gau.checkForUpdate({
|
setTimeout(() => {
|
||||||
currentVersion: app.getVersion(),
|
gau.checkForUpdate({
|
||||||
repo: 'https://api.github.com/repos/S2-/gitlit/releases/latest',
|
currentVersion: app.getVersion(),
|
||||||
assetMatch: /.+setup.+exe/i
|
repo: 'https://api.github.com/repos/S2-/gitlit/releases/latest',
|
||||||
});
|
assetMatch: /.+setup.+exe/i
|
||||||
|
|
||||||
gau.onUpdateAvailable = (version, asset) => {
|
|
||||||
win.webContents.send('update', {
|
|
||||||
event: 'updateAvailable',
|
|
||||||
version: version
|
|
||||||
});
|
});
|
||||||
gau.downloadNewVersion(asset);
|
|
||||||
};
|
|
||||||
|
|
||||||
gau.onNewVersionReadyToInstall = (file) => {
|
gau.onUpdateAvailable = (version, asset) => {
|
||||||
win.webContents.send('update', {
|
win.webContents.send('update', {
|
||||||
event: 'updateReadyToInstall',
|
event: 'updateAvailable',
|
||||||
file: file
|
version: version
|
||||||
});
|
});
|
||||||
};
|
gau.downloadNewVersion(asset);
|
||||||
|
};
|
||||||
|
|
||||||
ipcMain.on('installUpdate', (event, file) => {
|
gau.onNewVersionReadyToInstall = (file) => {
|
||||||
gau.executeUpdate(file);
|
win.webContents.send('update', {
|
||||||
win.webContents.send('update', {
|
event: 'updateReadyToInstall',
|
||||||
event: 'updateInstalling'
|
file: file
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ipcMain.on('installUpdate', (event, file) => {
|
||||||
|
gau.executeUpdate(file);
|
||||||
|
win.webContents.send('update', {
|
||||||
|
event: 'updateInstalling'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}, 5000);
|
||||||
}, 5000);
|
}
|
||||||
|
|
||||||
//end update stuff
|
//end update stuff
|
||||||
|
|
||||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlit",
|
"name": "gitlit",
|
||||||
"version": "2.0.2",
|
"version": "2.0.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1166,9 +1166,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github-app-updater": {
|
"github-app-updater": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.2.tgz",
|
||||||
"integrity": "sha512-gQ+DngMWmBRTP5wI6uuy2+m0ROfMphdUsrchN4kSmEc+9uAM67/xf7hluCnUL0dbrLaX7nxJ3VTTm7rZnQliOA==",
|
"integrity": "sha512-bVM4QjTytTLvXjVgzrb7qWApq3SkORFRzksTGI+lhDcliarzStZdu0Im9Git1sdEKiqADO8DEnHfNCua2tiZgQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"semver": "^7.3.2"
|
"semver": "^7.3.2"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlit",
|
"name": "gitlit",
|
||||||
"version": "2.0.2",
|
"version": "2.0.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "app/main.js",
|
"main": "app/main.js",
|
||||||
"build": {
|
"build": {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"ejs-render-remote": "^1.0.13",
|
"ejs-render-remote": "^1.0.13",
|
||||||
"electron-find": "^1.0.6",
|
"electron-find": "^1.0.6",
|
||||||
"electron-localshortcut": "^3.2.1",
|
"electron-localshortcut": "^3.2.1",
|
||||||
"github-app-updater": "^1.0.1",
|
"github-app-updater": "^1.0.2",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.5.1",
|
||||||
"material-design-icons": "^3.0.1",
|
"material-design-icons": "^3.0.1",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.5",
|
||||||
|
Reference in New Issue
Block a user