Fix package.json getting embedded in the release builds (#2635)
This commit is contained in:
parent
6ce8c2c48d
commit
850ed6502c
|
@ -12,6 +12,7 @@ import FtProgressBar from './components/ft-progress-bar/ft-progress-bar.vue'
|
|||
import { marked } from 'marked'
|
||||
import Parser from 'rss-parser'
|
||||
import { IpcChannels } from '../constants'
|
||||
import packageDetails from '../../package.json'
|
||||
|
||||
let ipcRenderer = null
|
||||
|
||||
|
@ -195,7 +196,6 @@ export default Vue.extend({
|
|||
|
||||
checkForNewUpdates: function () {
|
||||
if (this.checkForUpdates) {
|
||||
const { version } = require('../../package.json')
|
||||
const requestUrl = 'https://api.github.com/repos/freetubeapp/freetube/releases?per_page=1'
|
||||
|
||||
fetch(requestUrl)
|
||||
|
@ -209,7 +209,7 @@ export default Vue.extend({
|
|||
const message = this.$t('Version $ is now available! Click for more details')
|
||||
this.updateBannerMessage = message.replace('$', versionNumber)
|
||||
|
||||
const appVersion = version.split('.')
|
||||
const appVersion = packageDetails.version.split('.')
|
||||
const latestVersion = versionNumber.split('.')
|
||||
|
||||
if (parseInt(appVersion[0]) < parseInt(latestVersion[0])) {
|
||||
|
|
|
@ -2,8 +2,7 @@ import Vue from 'vue'
|
|||
import FtCard from '../../components/ft-card/ft-card.vue'
|
||||
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
|
||||
import FtButton from '../../components/ft-button/ft-button.vue'
|
||||
|
||||
const { version } = require('../../../../package.json')
|
||||
import packageDetails from '../../../../package.json'
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'About',
|
||||
|
@ -14,7 +13,7 @@ export default Vue.extend({
|
|||
},
|
||||
data: function () {
|
||||
return {
|
||||
versionNumber: `v${version}`,
|
||||
versionNumber: `v${packageDetails.version}`,
|
||||
chunks: [
|
||||
{
|
||||
icon: ['fab', 'github'],
|
||||
|
|
Loading…
Reference in New Issue