Skip to content

Fetch Latest Release

The latest release assets are available via the Cloud’s Content Delivery Network (CDN).

Download Assets by File Name

Each asset in the latest release can be downloaded with the following CDN URL:

https://cdn.crabnebula.app/download/<org-slug>/<app-slug>/latest/<asset-file-name>

Where you must replace <org-slug>, <app-slug> and <asset-file-name> with your organization’s slug, the application slug and the release asset file name, respectively. This endpoint is useful when you want to allow your users to download your application’s latest installer, for instance.

Download Assets by Public Platform

The CDN exposes an endpoint that can be used to fetch an asset in the latest release by its public platform instead of its filename:

https://cdn.crabnebula.app/download/<org-slug>/<app-slug>/latest/platform/<public-platform>

Where you must replace <org-slug>, <app-slug> and <public-platform> with your organization’s slug, the application slug and the executable’s public platform key, respectively.

Public platform keys that are automatically set by the CLI when using the --framework option are:

  • Linux:
    • deb-$arch
    • appimage-$arch
    • pacman-$arch
    • linux-$arch (for custom formats e.g. plain executable)
  • macOS:
    • dmg-$arch
    • macos-$arch (for custom formats e.g. plain executable)
  • Windows:
    • nsis-$arch
    • wix-$arch
    • windows-$arch (for custom formats e.g. plain executable)

Asset Metadata by Update Platform

The CDN additionally exposes an endpoint that can be used by your application to check for updates by taking a version number and update platform and producing a JSON object containing the update data if the version does not match the latest. The update metadata can be fetched with the following CDN URL:

https://cdn.crabnebula.app/update/<org-slug>/<app-slug>/<update-platform>/<current-version>

Where you must replace <org-slug>, <app-slug>, <update-platform> and <current-version> with your organization’s slug, the application slug, the executable’s update platform key and the current version, respectively. A list of update platform keys can be found on the Upload Assets page.

For instance when uploading the following linux-x86_64 and darwin-aarch64 assets:

Terminal window
cn release draft crabnebula-devtools "0.2.0"
cn release upload "crabnebula-devtools" "<release-id>" \
--update-platform linux-x86_64 \
--file <path_to_linux_binary> \
--signature <path_to_linux_signature>
cn release upload "crabnebula-devtools" "<release-id>" \
--update-platform darwin-aarch64 \
--file <path_to_macos_binary> \
--signature <path_to_macos_signature>
cn release publish crabnebula-devtools "<release-id>"

For the https://cdn.crabnebula.app/update/crabnebula/crabnebula-devtools/linux-x86_64/0.2.0 request, the current version matches latest so the response status code is 204.

For the https://cdn.crabnebula.app/update/crabnebula/crabnebula-devtools/linux-x86_64/0.1.0 request, the response status code is 200 with the following JSON body:

{
"version": "0.2.0",
"pub_date": "2024-03-19T02:35:10.440Z",
"notes": "...",
"url": "<linux-binary-download-url>",
"signature": "<contents_of_linux_signature_file>"
}

For the https://cdn.crabnebula.app/update/crabnebula/crabnebula-devtools/darwin-aarch64/1.0.0 request, the response status code is 200 with the following JSON body:

{
"version": "0.2.0",
"pub_date": "2024-03-19T02:35:10.440Z",
"notes": "...",
"url": "<macos-binary-download-url>",
"signature": "<contents_of_macos_signature_file>"
}