mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
refactor(website/download): read version number from package.json
This commit is contained in:
parent
6e97b08256
commit
cf47abe849
@ -1,8 +1,10 @@
|
|||||||
|
import rootPackageJson from '../../../../package.json';
|
||||||
|
|
||||||
export type Architecture = 'x64' | 'arm64';
|
export type Architecture = 'x64' | 'arm64';
|
||||||
|
|
||||||
export type Platform = 'mac' | 'windows' | 'linux';
|
export type Platform = 'mac' | 'windows' | 'linux';
|
||||||
|
|
||||||
let version = "v0.94.1";
|
let version = rootPackageJson.version;
|
||||||
|
|
||||||
export function buildDesktopDownloadUrl(platform: Platform, format: string, architecture: Architecture): string {
|
export function buildDesktopDownloadUrl(platform: Platform, format: string, architecture: Architecture): string {
|
||||||
return `https://github.com/TriliumNext/Notes/releases/download/${version}/TriliumNextNotes-${version}-${platform}-${architecture}.${format}`;
|
return `https://github.com/TriliumNext/Notes/releases/download/${version}/TriliumNextNotes-${version}-${platform}-${architecture}.${format}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user