Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 0 additions & 15 deletions packages/releases/index.mjs

This file was deleted.

3 changes: 2 additions & 1 deletion packages/releases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.1.3",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,7 +13,7 @@
"node": ">=12.19.0 <17.0.0"
},
"scripts": {
"build": "node index.mjs",
"build": "yarn tsc && node src/build-json.mjs",
"version": "yarn build"
},
"devDependencies": {
Expand Down
38 changes: 38 additions & 0 deletions packages/releases/src/build-json.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import Components from '../../components/package.json' assert { type: 'json' }
import Desktop from '../../desktop/package.json' assert { type: 'json' }
import Mobile from '../../mobile/package.json' assert { type: 'json' }
import Web from '../../web/package.json' assert { type: 'json' }
import { writeJson, ensureDirExists } from '../../../scripts/ScriptUtils.mjs'

const CdnUrl = 'https://github.com/standardnotes/app/releases/download/'
const DesktopPackageName = '@standardnotes/desktop'
const DesktopVersion = Desktop.version
const BaseFileName = `standard-notes-${DesktopVersion}`
const ReleaseUrl = `${CdnUrl}${DesktopPackageName}@${DesktopVersion}/${BaseFileName}`.replaceAll('@', '%40')

const Versions = {
[Components.name]: Components.version,
[Desktop.name]: Desktop.version,
[Mobile.name]: Mobile.version,
[Web.name]: Web.version,
}

const Downloads = {
LinuxAmd64Snap: `${ReleaseUrl}-linux-amd64.snap`,
LinuxAmd64Deb: `${ReleaseUrl}-linux-amd64.deb`,
LinuxArm64AppImage: `${ReleaseUrl}-linux-arm64.AppImage`,
LinuxArm64Deb: `${ReleaseUrl}-linux-arm64.deb`,
LinuxI386AppImage: `${ReleaseUrl}-linux-i386.AppImage`,
LinuxI386Deb: `${ReleaseUrl}-linux-i386.deb`,
LinuxX86_64AppImage: `${ReleaseUrl}-linux-x86_64.AppImage`,
MacArm64Dmg: `${ReleaseUrl}-mac-arm64.dmg`,
MacArm64Zip: `${ReleaseUrl}-mac-arm64.zip`,
MacX64Dmg: `${ReleaseUrl}-mac-x64.dmg`,
MacX64Zip: `${ReleaseUrl}-mac-x64.zip`,
WinIa32Exe: `${ReleaseUrl}-win-ia32.exe`,
WinX64Exe: `${ReleaseUrl}-win-x64.exe`,
WinExe: `${ReleaseUrl}-win.exe`,
}

ensureDirExists('dist')
writeJson({ Versions, Downloads }, 'dist/releases.json')
25 changes: 25 additions & 0 deletions packages/releases/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export enum Platform {
LinuxAmd64Snap,
LinuxAmd64Deb,
LinuxArm64AppImage,
LinuxArm64Deb,
LinuxI386AppImage,
LinuxI386Deb,
LinuxX86_64AppImage,
MacArm64Dmg,
MacArm64Zip,
MacX64Dmg,
MacX64Zip,
WinIa32Exe,
WinX64Exe,
WinExe,
}

export type Package =
| '@standardnotes/mobile'
| '@standardnotes/desktop'
| '@standardnotes/components-meta'
| '@standardnotes/web'

export type Versions = Record<Package, string>
export type Downloads = Record<Platform, string>
11 changes: 11 additions & 0 deletions packages/releases/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../UILib.tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "dist",
"emitDeclarationOnly": true
},
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
Loading