Added automatic app versioning system
This commit is contained in:
2
server/dist/app.js
vendored
2
server/dist/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@deemix-gui/deemix-server",
|
||||
"version": "0.1.0",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "webpack --watch",
|
||||
|
||||
@@ -2,3 +2,4 @@ import path from 'path'
|
||||
|
||||
export const ROOT_DIR = path.resolve(path.join(__dirname, '..', '..'))
|
||||
export const WEBUI_DIR = path.join(ROOT_DIR, 'webui', 'public')
|
||||
export const GUI_PACKAGE = path.join(ROOT_DIR, 'package.json')
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import fs from 'fs'
|
||||
import express from 'express'
|
||||
// @ts-expect-error
|
||||
import { Deezer } from 'deezer-js'
|
||||
import { GUI_PACKAGE } from '../helpers/paths'
|
||||
import { sessionDZ, getQueue, deemixVersion, isDeezerAvailable } from '../main'
|
||||
|
||||
const router = express.Router()
|
||||
@@ -11,9 +13,11 @@ router.get('/connect', async (req, res) => {
|
||||
const dz = sessionDZ[req.session.id]
|
||||
|
||||
if (!update) {
|
||||
const currentVersion = JSON.parse(String(fs.readFileSync(GUI_PACKAGE))).version
|
||||
console.log(currentVersion)
|
||||
update = {
|
||||
currentCommit: 'testing',
|
||||
latestCommit: 'testing',
|
||||
currentCommit: currentVersion === '0.0.0' ? 'continuous' : currentVersion,
|
||||
latestCommit: null,
|
||||
updateAvailable: false,
|
||||
deemixVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user