1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 20:30:05 +02:00

8 Commits

Author SHA1 Message Date
s2
1fe4d0d90c 2.0.5 2020-06-07 22:43:44 +02:00
s2
9873246826 auto update only on windows 2020-06-07 22:43:33 +02:00
s2
b8a94f650f 2.0.4 2020-06-07 22:17:29 +02:00
s2
e97a5c1fc2 just readme 2020-06-07 22:17:26 +02:00
s2
3d020a3ddd 2.0.3 2020-06-07 20:22:57 +02:00
s2
8765f99f19 update node modules 2020-06-07 20:22:50 +02:00
s2
cee594fcd9 2.0.2 2020-06-07 20:16:05 +02:00
s2
3c4d33eb83 just a note 2020-06-07 20:15:56 +02:00
4 changed files with 36 additions and 31 deletions

View File

@@ -45,6 +45,9 @@ npm install
npm run dist
```
## notes
Since version 2.0.1 the app auto updates itself using the [github-app-updater](https://www.npmjs.com/package/github-app-updater).
## license
ISC

View File

@@ -15,35 +15,37 @@ let repoDir = path.resolve(path.normalize(args._.join(' ')));
let repoRootDir = repoDir;
//auto update stuff
setTimeout(() => {
gau.checkForUpdate({
currentVersion: app.getVersion(),
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
if (process.platform === 'win32') {
setTimeout(() => {
gau.checkForUpdate({
currentVersion: app.getVersion(),
repo: 'https://api.github.com/repos/S2-/gitlit/releases/latest',
assetMatch: /.+setup.+exe/i
});
gau.downloadNewVersion(asset);
};
gau.onNewVersionReadyToInstall = (file) => {
win.webContents.send('update', {
event: 'updateReadyToInstall',
file: file
});
};
gau.onUpdateAvailable = (version, asset) => {
win.webContents.send('update', {
event: 'updateAvailable',
version: version
});
gau.downloadNewVersion(asset);
};
ipcMain.on('installUpdate', (event, file) => {
gau.executeUpdate(file);
win.webContents.send('update', {
event: 'updateInstalling'
gau.onNewVersionReadyToInstall = (file) => {
win.webContents.send('update', {
event: 'updateReadyToInstall',
file: file
});
};
ipcMain.on('installUpdate', (event, file) => {
gau.executeUpdate(file);
win.webContents.send('update', {
event: 'updateInstalling'
});
});
});
}, 5000);
}, 5000);
}
//end update stuff

8
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "gitlit",
"version": "2.0.1",
"version": "2.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1166,9 +1166,9 @@
}
},
"github-app-updater": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.1.tgz",
"integrity": "sha512-gQ+DngMWmBRTP5wI6uuy2+m0ROfMphdUsrchN4kSmEc+9uAM67/xf7hluCnUL0dbrLaX7nxJ3VTTm7rZnQliOA==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.2.tgz",
"integrity": "sha512-bVM4QjTytTLvXjVgzrb7qWApq3SkORFRzksTGI+lhDcliarzStZdu0Im9Git1sdEKiqADO8DEnHfNCua2tiZgQ==",
"requires": {
"node-fetch": "^2.6.0",
"semver": "^7.3.2"

View File

@@ -1,6 +1,6 @@
{
"name": "gitlit",
"version": "2.0.1",
"version": "2.0.5",
"description": "",
"main": "app/main.js",
"build": {
@@ -33,7 +33,7 @@
"ejs-render-remote": "^1.0.13",
"electron-find": "^1.0.6",
"electron-localshortcut": "^3.2.1",
"github-app-updater": "^1.0.1",
"github-app-updater": "^1.0.2",
"jquery": "^3.5.1",
"material-design-icons": "^3.0.1",
"minimist": "^1.2.5",