mirror of
https://github.com/pavlobu/deskreen.git
synced 2025-05-17 16:00:16 -07:00
22 lines
506 B
TypeScript
22 lines
506 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
import axios from 'axios';
|
|
|
|
const githubApiRepoTagsUrl =
|
|
'https://api.github.com/repos/pavlobu/deskreen/releases/latest';
|
|
|
|
export default async function getNewVersionTag() {
|
|
let latestVersionTag = '';
|
|
|
|
const response = await axios({
|
|
url: githubApiRepoTagsUrl,
|
|
method: 'get',
|
|
headers: { 'User-Agent': 'node.js' },
|
|
});
|
|
|
|
const tagName = response.data.tag_name;
|
|
|
|
latestVersionTag = tagName.slice(1);
|
|
|
|
return latestVersionTag;
|
|
}
|