Skip to content

Commit 6c9a8a8

Browse files
committed
feat: rename cargo-dist-schema => dist-schema
1 parent b1e8366 commit 6c9a8a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+125
-123
lines changed

.github/workflows/publish-crates.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- run: cargo publish -p axoproject --token ${CRATES_TOKEN}
3232
env:
3333
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
34-
- run: cargo publish -p cargo-dist-schema --token ${CRATES_TOKEN}
34+
- run: cargo publish -p dist-schema --token ${CRATES_TOKEN}
3535
env:
3636
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
3737
- run: cargo publish -p dist --token ${CRATES_TOKEN}

Cargo.lock

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.74"
1717

1818
[workspace.dependencies]
1919
# intra-workspace deps (you need to bump these versions when you cut releases too!
20-
cargo-dist-schema = { version = "=0.28.0", path = "cargo-dist-schema" }
20+
dist-schema = { version = "=0.28.0", path = "cargo-dist-schema" }
2121
axoproject = { version = "=0.28.0", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }
2222

2323
# first-party deps

cargo-dist-schema/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "cargo-dist-schema"
2+
name = "dist-schema"
33
description = "Schema information for cargo-dist's dist-manifest.json"
44
version.workspace = true
55
edition.workspace = true

cargo-dist/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ axocli.workspace = true
3535
axoupdater.workspace = true
3636

3737
# Features used by the cli and library
38-
cargo-dist-schema.workspace = true
38+
dist-schema.workspace = true
3939
axoproject.workspace = true
4040

4141
axotag.workspace = true

cargo-dist/src/announce.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ use std::fmt::Display;
9090

9191
use axoproject::PackageIdx;
9292
use axotag::{parse_tag, Package, PartialAnnouncementTag, ReleaseType};
93-
use cargo_dist_schema::{DistManifest, GithubHosting, TripleName, TripleNameRef};
93+
use dist_schema::{DistManifest, GithubHosting, TripleName, TripleNameRef};
9494
use itertools::Itertools;
9595
use semver::Version;
9696
use tracing::info;
@@ -884,9 +884,9 @@ pub fn announcement_github(manifest: &mut DistManifest) {
884884

885885
for (_name, artifact) in manifest.artifacts_for_release(release) {
886886
match artifact.kind {
887-
cargo_dist_schema::ArtifactKind::ExecutableZip => bundles.push(artifact),
888-
cargo_dist_schema::ArtifactKind::Symbols => symbols.push(artifact),
889-
cargo_dist_schema::ArtifactKind::Installer => {
887+
dist_schema::ArtifactKind::ExecutableZip => bundles.push(artifact),
888+
dist_schema::ArtifactKind::Symbols => symbols.push(artifact),
889+
dist_schema::ArtifactKind::Installer => {
890890
if let (Some(desc), Some(hint)) =
891891
(&artifact.description, &artifact.install_hint)
892892
{
@@ -895,10 +895,10 @@ pub fn announcement_github(manifest: &mut DistManifest) {
895895
local_installers.push(artifact);
896896
}
897897
}
898-
cargo_dist_schema::ArtifactKind::Checksum => {
898+
dist_schema::ArtifactKind::Checksum => {
899899
// Do Nothing (will be included with the artifact it checksums)
900900
}
901-
cargo_dist_schema::ArtifactKind::Unknown => {
901+
dist_schema::ArtifactKind::Unknown => {
902902
// Do nothing
903903
}
904904
_ => {
@@ -1022,7 +1022,7 @@ fn sortable_triple(triple: &TripleNameRef) -> Vec<String> {
10221022

10231023
#[cfg(test)]
10241024
mod tests {
1025-
use cargo_dist_schema::TripleNameRef;
1025+
use dist_schema::TripleNameRef;
10261026

10271027
use super::sortable_triple;
10281028
#[test]

cargo-dist/src/backend/ci/github.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::collections::BTreeMap;
77
use axoasset::{LocalAsset, SourceFile};
88
use axoprocess::Cmd;
99
use camino::{Utf8Path, Utf8PathBuf};
10-
use cargo_dist_schema::{
10+
use dist_schema::{
1111
target_lexicon::{self, Architecture, OperatingSystem, Triple},
1212
AptPackageName, ChocolateyPackageName, ContainerImageRef, GhaRunStep, GithubGlobalJobConfig,
1313
GithubLocalJobConfig, GithubMatrix, GithubRunnerConfig, GithubRunnerRef, GithubRunners,
@@ -66,9 +66,9 @@ pub struct GithubCiInfo {
6666
/// Trigger releases on pushes to this branch instead of ci
6767
pub release_branch: Option<String>,
6868
/// Matrix for upload-local-artifacts
69-
pub artifacts_matrix: cargo_dist_schema::GithubMatrix,
69+
pub artifacts_matrix: dist_schema::GithubMatrix,
7070
/// What kind of job to run on pull request
71-
pub pr_run_mode: cargo_dist_schema::PrRunMode,
71+
pub pr_run_mode: dist_schema::PrRunMode,
7272
/// global task
7373
pub global_task: GithubGlobalJobConfig,
7474
/// homebrew tap
@@ -222,7 +222,7 @@ impl GithubCiInfo {
222222
let mut dependencies = SystemDependencies::default();
223223

224224
let caching_could_be_profitable =
225-
release_branch.is_some() || pr_run_mode == cargo_dist_schema::PrRunMode::Upload;
225+
release_branch.is_some() || pr_run_mode == dist_schema::PrRunMode::Upload;
226226
let cache_builds = cache_builds.unwrap_or(caching_could_be_profitable);
227227

228228
let need_cargo_auditable = dist.config.builds.cargo.cargo_auditable;
@@ -679,10 +679,10 @@ fn cargo_xwin() -> GithubRunnerConfig {
679679
GithubRunnerConfig {
680680
runner: GithubRunnerRef::from_str("ubuntu-20.04").to_owned(),
681681
host: targets::TARGET_X64_LINUX_GNU.to_owned(),
682-
container: Some(cargo_dist_schema::ContainerConfig {
682+
container: Some(dist_schema::ContainerConfig {
683683
image: ContainerImageRef::from_str("messense/cargo-xwin").to_owned(),
684684
host: targets::TARGET_X64_LINUX_MUSL.to_owned(),
685-
package_manager: Some(cargo_dist_schema::PackageManager::Apt),
685+
package_manager: Some(dist_schema::PackageManager::Apt),
686686
}),
687687
}
688688
}
@@ -743,7 +743,7 @@ fn system_deps_install_script(
743743
// apt-using runners.
744744
if rc.container.is_none()
745745
|| rc.container.as_ref().and_then(|c| c.package_manager)
746-
== Some(cargo_dist_schema::PackageManager::Apt)
746+
== Some(dist_schema::PackageManager::Apt)
747747
{
748748
for (name, pkg) in &packages.apt {
749749
if !pkg.0.stage_wanted(&DependencyKind::Build) {

cargo-dist/src/backend/ci/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Support for generating CI scripts for running dist
22
3-
use cargo_dist_schema::{
3+
use dist_schema::{
44
target_lexicon::{OperatingSystem, Triple},
55
DashScript, GhaRunStep, PowershellScript,
66
};
@@ -101,7 +101,7 @@ impl DistInstallSettings<'_> {
101101
}
102102

103103
let version = self.version;
104-
let format = cargo_dist_schema::format_of_version(version);
104+
let format = dist_schema::format_of_version(version);
105105
let installer_name = if format.unsupported() {
106106
// FIXME: we should probably do this check way higher up and produce a proper err...
107107
panic!("requested dist v{version}, which is not supported by the this copy of dist ({SELF_DIST_VERSION})");

cargo-dist/src/backend/installer/homebrew.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Code for generating formula.rb
22
33
use axoasset::LocalAsset;
4-
use cargo_dist_schema::{ChecksumValue, DistManifest, HomebrewPackageName};
4+
use dist_schema::{ChecksumValue, DistManifest, HomebrewPackageName};
55
use serde::Serialize;
66
use spdx::{
77
expression::{ExprNode, Operator},

cargo-dist/src/backend/installer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::collections::BTreeMap;
66

77
use camino::Utf8PathBuf;
8-
use cargo_dist_schema::{ArtifactId, EnvironmentVariables, Hosting, TripleName};
8+
use dist_schema::{ArtifactId, EnvironmentVariables, Hosting, TripleName};
99
use homebrew::HomebrewFragments;
1010
use macpkg::PkgInstallerInfo;
1111
use serde::Serialize;

cargo-dist/src/backend/installer/msi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use axoasset::{toml_edit, LocalAsset};
44
use camino::{Utf8Path, Utf8PathBuf};
5-
use cargo_dist_schema::TripleName;
5+
use dist_schema::TripleName;
66
use tracing::info;
77
use wix::print::{wxs::WxsRenders, RenderOutput};
88

cargo-dist/src/backend/installer/npm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use axoasset::{LocalAsset, SourceFile};
44
use camino::{Utf8Path, Utf8PathBuf};
5-
use cargo_dist_schema::{ArtifactId, GlibcVersion, TripleName};
5+
use dist_schema::{ArtifactId, GlibcVersion, TripleName};
66
use serde::Serialize;
77

88
use super::InstallerInfo;

cargo-dist/src/backend/installer/shell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Code for generating installer.sh
22
33
use axoasset::LocalAsset;
4-
use cargo_dist_schema::DistManifest;
4+
use dist_schema::DistManifest;
55

66
use crate::{backend::templates::TEMPLATE_INSTALLER_SH, errors::DistResult, DistGraph};
77

cargo-dist/src/build/cargo.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use std::env;
44

55
use axoprocess::Cmd;
66
use axoproject::WorkspaceIdx;
7-
use cargo_dist_schema::target_lexicon::{Architecture, Environment, Triple};
8-
use cargo_dist_schema::{DistManifest, TripleName};
7+
use dist_schema::target_lexicon::{Architecture, Environment, Triple};
8+
use dist_schema::{DistManifest, TripleName};
99
use miette::{Context, IntoDiagnostic};
1010
use tracing::warn;
1111

@@ -272,7 +272,7 @@ pub fn build_cargo_target(
272272
}
273273

274274
let auditable = dist_graph.config.builds.cargo.cargo_auditable;
275-
let host = cargo_dist_schema::target_lexicon::HOST;
275+
let host = dist_schema::target_lexicon::HOST;
276276
let mut command =
277277
make_build_cargo_target_command(&host, &cargo.cmd, &rustflags, step, auditable)?;
278278

cargo-dist/src/build/fake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
use axoasset::LocalAsset;
77
use camino::Utf8PathBuf;
8-
use cargo_dist_schema::DistManifest;
8+
use dist_schema::DistManifest;
99

1010
use crate::{BinaryIdx, CargoBuildStep, DistGraph, DistResult, GenericBuildStep};
1111

cargo-dist/src/build/generic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{env, process::ExitStatus};
55
use axoprocess::Cmd;
66
use axoproject::WorkspaceIdx;
77
use camino::{Utf8Path, Utf8PathBuf};
8-
use cargo_dist_schema::{DistManifest, TripleName, TripleNameRef};
8+
use dist_schema::{DistManifest, TripleName, TripleNameRef};
99

1010
use crate::{
1111
build::{package_id_string, BuildExpectations},

cargo-dist/src/build/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use axoproject::PackageId;
44
use camino::Utf8PathBuf;
5-
use cargo_dist_schema::{AssetInfo, DistManifest, TripleNameRef};
5+
use dist_schema::{AssetInfo, DistManifest, TripleNameRef};
66
use tracing::info;
77

88
use crate::{
@@ -207,8 +207,8 @@ impl BuildExpectations {
207207
// If we're faking it, don't run the linkage stuff
208208
let linkage = if self.fake {
209209
// FIXME: fake this more interestingly!
210-
let mut linkage = cargo_dist_schema::Linkage::default();
211-
linkage.other.insert(cargo_dist_schema::Library {
210+
let mut linkage = dist_schema::Linkage::default();
211+
linkage.other.insert(dist_schema::Library {
212212
path: "fakelib".to_owned(),
213213
source: None,
214214
package_manager: None,

cargo-dist/src/cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! All the clap stuff for parsing/documenting the cli
22
33
use camino::Utf8PathBuf;
4-
use cargo_dist_schema::TripleName;
54
use clap::{
65
builder::{PossibleValuesParser, TypedValueParser},
76
Args, Parser, Subcommand, ValueEnum,
87
};
98
use dist::announce::{TagMode, TagSettings};
9+
use dist_schema::TripleName;
1010
use tracing::level_filters::LevelFilter;
1111

1212
#[derive(Parser, Clone, Debug)]

cargo-dist/src/config/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::collections::BTreeMap;
55
use axoasset::{toml_edit, SourceFile};
66
use axoproject::local_repo::LocalRepo;
77
use camino::{Utf8Path, Utf8PathBuf};
8-
use cargo_dist_schema::{
8+
use dist_schema::{
99
AptPackageName, ChecksumExtensionRef, ChocolateyPackageName, HomebrewPackageName,
1010
PackageVersion, TripleName, TripleNameRef,
1111
};
@@ -175,13 +175,13 @@ impl std::str::FromStr for LibraryStyle {
175175
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq)]
176176
#[serde(rename_all = "kebab-case")]
177177
pub enum InstallerStyle {
178-
/// Generate a shell script that fetches from [`cargo_dist_schema::Release::artifact_download_url`][]
178+
/// Generate a shell script that fetches from [`dist_schema::Release::artifact_download_url`][]
179179
Shell,
180-
/// Generate a powershell script that fetches from [`cargo_dist_schema::Release::artifact_download_url`][]
180+
/// Generate a powershell script that fetches from [`dist_schema::Release::artifact_download_url`][]
181181
Powershell,
182-
/// Generate an npm project that fetches from [`cargo_dist_schema::Release::artifact_download_url`][]
182+
/// Generate an npm project that fetches from [`dist_schema::Release::artifact_download_url`][]
183183
Npm,
184-
/// Generate a Homebrew formula that fetches from [`cargo_dist_schema::Release::artifact_download_url`][]
184+
/// Generate a Homebrew formula that fetches from [`dist_schema::Release::artifact_download_url`][]
185185
Homebrew,
186186
/// Generate an msi installer that embeds the binary
187187
Msi,

cargo-dist/src/config/v0.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! v0 config
22
33
use camino::{Utf8Path, Utf8PathBuf};
4-
use cargo_dist_schema::{
4+
use dist_schema::{
55
declare_strongly_typed_string, GithubRunner, GithubRunnerConfigInput, StringLikeOr,
66
};
77
use semver::Version;
@@ -78,7 +78,7 @@ pub struct DistMetadata {
7878
/// only plan out the release without running builds and "skip" will disable
7979
/// pull request runs entirely.
8080
#[serde(skip_serializing_if = "Option::is_none")]
81-
pub pr_run_mode: Option<cargo_dist_schema::PrRunMode>,
81+
pub pr_run_mode: Option<dist_schema::PrRunMode>,
8282

8383
/// Generate targets whose dist should avoid checking for up-to-dateness.
8484
#[serde(skip_serializing_if = "Option::is_none")]

cargo-dist/src/config/v1/ci/github.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! github ci config
22
3-
use cargo_dist_schema::{
3+
use dist_schema::{
44
ContainerConfig, GithubRunner, GithubRunnerConfig, GithubRunnerConfigInput, StringLikeOr,
55
TripleName,
66
};

0 commit comments

Comments
 (0)