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

10 Commits

Author SHA1 Message Date
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
s2
48b5f33eb9 2.0.1 2020-06-07 20:04:45 +02:00
s2
64b500f414 update node modules 2020-06-07 20:04:45 +02:00
s2
caeaab14b8 remove console.log 2020-06-07 19:50:00 +02:00
s2
94e7c5ce71 don't publish by default in electron builder 2020-06-07 19:48:06 +02:00
5 changed files with 20 additions and 14 deletions

View File

@@ -45,6 +45,9 @@ npm install
npm run dist 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 ## license
ISC ISC

View File

@@ -12,6 +12,7 @@
ipcRenderer.on('update', (event, state) => { ipcRenderer.on('update', (event, state) => {
if (state.event === 'updateAvailable') { if (state.event === 'updateAvailable') {
$('.js-updatenotice').text(`New version ${state.version} available. Downloading...`); $('.js-updatenotice').text(`New version ${state.version} available. Downloading...`);
$('.js-updatenotice').prop('disabled', true);
$('.js-updatenotice').show(); $('.js-updatenotice').show();
} }
@@ -25,6 +26,9 @@
$(document).on('click', '.js-updatenotice', (ev) => { $(document).on('click', '.js-updatenotice', (ev) => {
ev.preventDefault(); ev.preventDefault();
if ($('.js-updatenotice').prop('disabled')) {
return;
}
$('.js-updatenotice').prop('disabled', true); $('.js-updatenotice').prop('disabled', true);
$('.js-updatenotice').text(`Launching installer...`); $('.js-updatenotice').text(`Launching installer...`);
ipcRenderer.send('installUpdate', $('.js-updatenotice').data('file')); ipcRenderer.send('installUpdate', $('.js-updatenotice').data('file'));

View File

@@ -17,13 +17,12 @@ let repoRootDir = repoDir;
//auto update stuff //auto update stuff
setTimeout(() => { setTimeout(() => {
gau.checkForUpdate({ gau.checkForUpdate({
currentVersion: '1.0.0', //app.getVersion(), currentVersion: app.getVersion(),
repo: 'https://api.github.com/repos/S2-/gitlit/releases/latest', repo: 'https://api.github.com/repos/S2-/gitlit/releases/latest',
assetMatch: /.+setup.+exe/i assetMatch: /.+setup.+exe/i
}); });
gau.onUpdateAvailable = (version, asset) => { gau.onUpdateAvailable = (version, asset) => {
console.log('onUpdateAvailable');
win.webContents.send('update', { win.webContents.send('update', {
event: 'updateAvailable', event: 'updateAvailable',
version: version version: version

14
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlit", "name": "gitlit",
"version": "2.0.0", "version": "2.0.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -264,9 +264,9 @@
} }
}, },
"bootstrap": { "bootstrap": {
"version": "4.4.1", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
"integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==" "integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA=="
}, },
"boxen": { "boxen": {
"version": "3.2.0", "version": "3.2.0",
@@ -1166,9 +1166,9 @@
} }
}, },
"github-app-updater": { "github-app-updater": {
"version": "1.0.0", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.0.tgz", "resolved": "https://registry.npmjs.org/github-app-updater/-/github-app-updater-1.0.2.tgz",
"integrity": "sha512-GwWnHfJxqL+d/IdMyVLFqvP3NG8JFwBnd6obdAjjxl4YkWonRR/bK3WaCc+RnyMoUQUT63mz/cqTGpA4d7nOPQ==", "integrity": "sha512-bVM4QjTytTLvXjVgzrb7qWApq3SkORFRzksTGI+lhDcliarzStZdu0Im9Git1sdEKiqADO8DEnHfNCua2tiZgQ==",
"requires": { "requires": {
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"semver": "^7.3.2" "semver": "^7.3.2"

View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlit", "name": "gitlit",
"version": "2.0.0", "version": "2.0.4",
"description": "", "description": "",
"main": "app/main.js", "main": "app/main.js",
"build": { "build": {
@@ -28,12 +28,12 @@
}, },
"dependencies": { "dependencies": {
"animate.css": "^3.5.2", "animate.css": "^3.5.2",
"bootstrap": "^4.4.1", "bootstrap": "^4.5.0",
"ejs": "^2.7.4", "ejs": "^2.7.4",
"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.0", "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",
@@ -47,8 +47,8 @@
}, },
"scripts": { "scripts": {
"start": "electron .", "start": "electron .",
"pack": "electron-builder --linux --win portable nsis --dir", "pack": "electron-builder --linux --win portable nsis --dir --publish=never",
"dist": "electron-builder --linux --win portable nsis" "dist": "electron-builder --linux --win portable nsis --publish=never"
}, },
"repository": { "repository": {
"type": "git", "type": "git",