-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look for and consume the dist-manifest.json file #854
Comments
This looks great and it could be used to reduce amount of urls created if |
Example of such {
"dist_version": "0.0.6-prerelease.8",
"announcement_tag": "v0.0.7",
"announcement_is_prerelease": false,
"announcement_title": "Version 0.0.7 (2023-05-09)",
"announcement_changelog": "This is just a quick little release that makes the npm package tarballs we can generate\nlook like \"properly\" packed tarballs that can be directly published to npm without unpacking them.\nThis allows you to `npm publish URL_TO_TARBALL` directly without any issues.\n\n@gankra [impl](https://github.com/axodotdev/cargo-dist/pull/246)",
"announcement_github_body": "## Release Notes\n\nThis is just a quick little release that makes the npm package tarballs we can generate\nlook like \"properly\" packed tarballs that can be directly published to npm without unpacking them.\nThis allows you to `npm publish URL_TO_TARBALL` directly without any issues.\n\n@gankra [impl](https://github.com/axodotdev/cargo-dist/pull/246)\n\n## Install cargo-dist 0.0.7\n\n### Install prebuilt binaries via shell script\n\n```shell\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh\n```\n\n### Install prebuilt binaries via powershell script\n\n```shell\nirm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.ps1 | iex\n```\n\n## Download cargo-dist 0.0.7\n\n| target | kind | download |\n|--------|------|----------|\n| aarch64-apple-darwin | tarball | [cargo-dist-aarch64-apple-darwin.tar.xz](https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-aarch64-apple-darwin.tar.xz) |\n| x86_64-apple-darwin | tarball | [cargo-dist-x86_64-apple-darwin.tar.xz](https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-x86_64-apple-darwin.tar.xz) |\n| x86_64-pc-windows-msvc | tarball | [cargo-dist-x86_64-pc-windows-msvc.zip](https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-x86_64-pc-windows-msvc.zip) |\n| x86_64-unknown-linux-gnu | tarball | [cargo-dist-x86_64-unknown-linux-gnu.tar.xz](https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-x86_64-unknown-linux-gnu.tar.xz) |\n\n",
"releases": [
{
"app_name": "cargo-dist",
"app_version": "0.0.7",
"artifacts": [
"cargo-dist-installer.sh",
"cargo-dist-installer.ps1",
"cargo-dist-aarch64-apple-darwin.tar.xz",
"cargo-dist-x86_64-apple-darwin.tar.xz",
"cargo-dist-x86_64-pc-windows-msvc.zip",
"cargo-dist-x86_64-unknown-linux-gnu.tar.xz"
]
}
],
"artifacts": {
"cargo-dist-aarch64-apple-darwin.tar.xz": {
"name": "cargo-dist-aarch64-apple-darwin.tar.xz",
"kind": "executable-zip",
"target_triples": [
"aarch64-apple-darwin"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist",
"kind": "executable"
}
]
},
"cargo-dist-installer.ps1": {
"name": "cargo-dist-installer.ps1",
"kind": "installer",
"target_triples": [
"x86_64-pc-windows-msvc"
],
"install_hint": "irm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.ps1 | iex",
"description": "Install prebuilt binaries via powershell script"
},
"cargo-dist-installer.sh": {
"name": "cargo-dist-installer.sh",
"kind": "installer",
"target_triples": [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"install_hint": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh",
"description": "Install prebuilt binaries via shell script"
},
"cargo-dist-x86_64-apple-darwin.tar.xz": {
"name": "cargo-dist-x86_64-apple-darwin.tar.xz",
"kind": "executable-zip",
"target_triples": [
"x86_64-apple-darwin"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist",
"kind": "executable"
}
]
},
"cargo-dist-x86_64-pc-windows-msvc.zip": {
"name": "cargo-dist-x86_64-pc-windows-msvc.zip",
"kind": "executable-zip",
"target_triples": [
"x86_64-pc-windows-msvc"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist.exe",
"kind": "executable"
}
]
},
"cargo-dist-x86_64-unknown-linux-gnu.tar.xz": {
"name": "cargo-dist-x86_64-unknown-linux-gnu.tar.xz",
"kind": "executable-zip",
"target_triples": [
"x86_64-unknown-linux-gnu"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist",
"kind": "executable"
}
]
}
}
} |
From the {
"releases": [
{
"app_name": "cargo-dist",
"app_version": "0.0.7",
"artifacts": [
"cargo-dist-installer.sh",
"cargo-dist-installer.ps1",
"cargo-dist-aarch64-apple-darwin.tar.xz",
"cargo-dist-x86_64-apple-darwin.tar.xz",
"cargo-dist-x86_64-pc-windows-msvc.zip",
"cargo-dist-x86_64-unknown-linux-gnu.tar.xz"
]
}
],
} basically just: #[derive(Debug, Deserialize)]
struct DistManifest {
releases: Vec<DistManifestRelease>,
}
#[derive(Debug, Deserialize)]
struct DistManifestRelease {
app_name: CompactString,
app_version: CompactString,
artifacts: Vec<CompactString>,
} |
Sure, but to ensure compatibility, we can use the parsing crate that cargo dist makes available instead of defining the structs ourselves. |
I look at what
|
In the PR you submitted for me (thanks), you say "dist-manifest.json is deprecated." Is this proposed path for this issue (use dist-manifest.json) still valid? |
The manifest format of the crate version you were using, specifically. |
We can use https://crates.io/crates/cargo-dist-schema to parse it.
Finding that file still requires us to autodiscover the tag, but if we do find it, we can have a much more efficient discovery.
The text was updated successfully, but these errors were encountered: