copy-metainfo.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { resolveChannel } from "./utils"
  2. const arg = process.argv[2]
  3. const channel = arg === "dev" || arg === "beta" || arg === "prod" ? arg : resolveChannel()
  4. const appId = channel === "prod" ? "org.lambda-scientist.desktop" : `org.lambda-scientist.desktop.${channel}`
  5. const productName =
  6. channel === "prod" ? "λ-Scientist" : `λ-Scientist ${channel.charAt(0).toUpperCase() + channel.slice(1)}`
  7. const summary = `Verifiable autonomous scientific research${channel !== "prod" ? ` (${channel})` : ""}`
  8. const xml = `<?xml version="1.0" encoding="UTF-8"?>
  9. <component type="desktop-application">
  10. <id>${appId}</id>
  11. <metadata_license>CC0-1.0</metadata_license>
  12. <project_license>MIT</project_license>
  13. <name>${productName}</name>
  14. <summary>${summary}</summary>
  15. <developer id="org.lambda-scientist">
  16. <name>λ-Scientist</name>
  17. </developer>
  18. <description>
  19. <p>
  20. λ-Scientist connects research evidence, verifiable execution and collaborative agents.
  21. </p>
  22. </description>
  23. <launchable type="desktop-id">${appId}.desktop</launchable>
  24. <content_rating type="oars-1.1" />
  25. </component>
  26. `
  27. await Bun.write(`resources/${appId}.metainfo.xml`, xml)
  28. console.log(`Generated metainfo for ${channel} at resources/${appId}.metainfo.xml`)