Skip to content

Commit

Permalink
quickly fix how releases are checked for
Browse files Browse the repository at this point in the history
(it is broken in the draft release)
  • Loading branch information
MarmadileManteater committed Oct 30, 2024
1 parent efc9d8e commit f4c600e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,15 @@ export default defineComponent({
.then((response) => response.json())
.then((json) => {
const tagName = json[0].tag_name
const tagNameParts = tagName.split('.')
const versionNumber = tagNameParts[tagNameParts.length - 1]
this.updateChangelog = marked.parse(json[0].body)
this.changeLogTitle = json[0].name

const message = this.$t('Version $ is now available! Click for more details')
this.updateBannerMessage = message.replace('$', tagName)
const versionParts = packageDetails.version.split('.')
const appVersion = versionParts[versionParts.length - 1]
if (parseInt(versionNumber) > parseInt(appVersion)) {
function versionNumberGt(versionA, versionB) {
return [versionA, versionB].sort().at(-1) === versionA
}
if (versionNumberGt(json[0].name, packageDetails.version)) {
this.showUpdatesBanner = true
}
})
Expand Down

0 comments on commit f4c600e

Please sign in to comment.