Files
Motionity/package.json
T
kawaandClaude Opus 5 f2b9f28d14 build: add Gitea release scripts and npm entry points
scripts/build-release.ps1 packages the desktop installers; scripts/publish.ps1
pushes the container image to git.azuze.fr and attaches the installers to the
Gitea release for the same tag. The split keeps a local build free of any
credential, and lets a failed upload be retried with -BinariesOnly
-NoBinaryBuild without paying for the build again.

Two details the plain `npm run dist:*` path gets wrong for a release:

- package.json's global artifactName resolves NSIS and portable to the same
  file name, so one silently overwrites the other. The build script passes
  distinct -c.nsis.artifactName / -c.portable.artifactName.
- Artifact names now carry the tag, so publish.ps1 can glob exactly one tag's
  files and never ship a stale one. electron-builder's update metadata
  (.blockmap, latest*.yml, the NSIS .7z payload) is swept out of dist/ so it
  cannot match that glob and end up attached to the release.

The tag defaults to v<package.json version> rather than git describe, because
electron-builder stamps package.json into the app: a SHA-based tag would name
an installer whose About box disagrees with it.

Also brings scripts/server.cjs, vendor.mjs and make-icon.cjs under version
control, which the release scripts and the Docker build both call.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 12:56:11 +02:00

91 lines
2.9 KiB
JSON

{
"name": "motionity",
"productName": "Motionity",
"version": "1.0.0",
"description": "Web-based motion graphics editor with keyframing, masking, filters and text animations",
"license": "MIT",
"main": "electron/main.js",
"private": true,
"scripts": {
"vendor": "node scripts/vendor.mjs",
"icons": "node scripts/make-icon.cjs",
"start": "node scripts/server.cjs",
"dev": "electron .",
"dist:win": "npm run vendor && npm run icons && electron-builder --win",
"dist:appimage": "npm run vendor && npm run icons && electron-builder --linux AppImage",
"dist:flatpak": "npm run vendor && npm run icons && electron-builder --linux flatpak",
"dist:linux": "npm run vendor && npm run icons && electron-builder --linux AppImage flatpak",
"docker:build": "docker build -t motionity:latest .",
"docker:run": "docker run --rm -p 8080:8080 motionity:latest",
"release:build": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/build-release.ps1",
"release:binaries": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/publish.ps1 -BinariesOnly",
"release": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/publish.ps1 -PublishRelease",
"test": "node --test \"test/**/*.test.js\""
},
"devDependencies": {
"electron": "^40.0.0",
"electron-builder": "^26.0.0"
},
"build": {
"appId": "app.motionity.desktop",
"productName": "Motionity",
"artifactName": "${productName}-${version}-${arch}.${ext}",
"directories": {
"output": "dist",
"buildResources": "build"
},
"files": [
"electron/**/*",
"scripts/server.cjs",
"src/**/*",
"!src/**/*.map"
],
"win": {
"target": [
{ "target": "nsis", "arch": ["x64"] },
{ "target": "portable", "arch": ["x64"] }
],
"icon": "build/icon.png"
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"perMachine": false,
"createDesktopShortcut": true,
"shortcutName": "Motionity"
},
"linux": {
"target": ["AppImage", "flatpak"],
"icon": "build/icon.png",
"category": "Graphics",
"synopsis": "Motion graphics editor",
"desktop": {
"entry": {
"Name": "Motionity",
"Categories": "Graphics;AudioVideo;VideoEditor;"
}
}
},
"appImage": {
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"flatpak": {
"runtimeVersion": "23.08",
"baseVersion": "23.08",
"finishArgs": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--socket=pulseaudio",
"--device=dri",
"--share=network",
"--filesystem=xdg-download",
"--filesystem=xdg-documents",
"--filesystem=xdg-pictures",
"--filesystem=xdg-videos",
"--filesystem=xdg-music"
]
}
}
}