Skip to content
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

feat: rename cargo-dist => dist #1648

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
- run: cargo publish -p axoproject --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- run: cargo publish -p cargo-dist-schema --token ${CRATES_TOKEN}
- run: cargo publish -p dist-schema --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- run: cargo publish -p cargo-dist --token ${CRATES_TOKEN}
- run: cargo publish -p dist --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
130 changes: 65 additions & 65 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rust-version = "1.74"

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

# first-party deps
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist-schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cargo-dist-schema"
name = "dist-schema"
description = "Schema information for cargo-dist's dist-manifest.json"
version.workspace = true
edition.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions cargo-dist/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cargo-dist"
name = "dist"
description = "Shippable application packaging for Rust"
version.workspace = true
edition.workspace = true
Expand Down Expand Up @@ -35,7 +35,7 @@ axocli.workspace = true
axoupdater.workspace = true

# Features used by the cli and library
cargo-dist-schema.workspace = true
dist-schema.workspace = true
axoproject.workspace = true

axotag.workspace = true
Expand Down
14 changes: 7 additions & 7 deletions cargo-dist/src/announce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ use std::fmt::Display;

use axoproject::PackageIdx;
use axotag::{parse_tag, Package, PartialAnnouncementTag, ReleaseType};
use cargo_dist_schema::{DistManifest, GithubHosting, TripleName, TripleNameRef};
use dist_schema::{DistManifest, GithubHosting, TripleName, TripleNameRef};
use itertools::Itertools;
use semver::Version;
use tracing::info;
Expand Down Expand Up @@ -884,9 +884,9 @@ pub fn announcement_github(manifest: &mut DistManifest) {

for (_name, artifact) in manifest.artifacts_for_release(release) {
match artifact.kind {
cargo_dist_schema::ArtifactKind::ExecutableZip => bundles.push(artifact),
cargo_dist_schema::ArtifactKind::Symbols => symbols.push(artifact),
cargo_dist_schema::ArtifactKind::Installer => {
dist_schema::ArtifactKind::ExecutableZip => bundles.push(artifact),
dist_schema::ArtifactKind::Symbols => symbols.push(artifact),
dist_schema::ArtifactKind::Installer => {
if let (Some(desc), Some(hint)) =
(&artifact.description, &artifact.install_hint)
{
Expand All @@ -895,10 +895,10 @@ pub fn announcement_github(manifest: &mut DistManifest) {
local_installers.push(artifact);
}
}
cargo_dist_schema::ArtifactKind::Checksum => {
dist_schema::ArtifactKind::Checksum => {
// Do Nothing (will be included with the artifact it checksums)
}
cargo_dist_schema::ArtifactKind::Unknown => {
dist_schema::ArtifactKind::Unknown => {
// Do nothing
}
_ => {
Expand Down Expand Up @@ -1022,7 +1022,7 @@ fn sortable_triple(triple: &TripleNameRef) -> Vec<String> {

#[cfg(test)]
mod tests {
use cargo_dist_schema::TripleNameRef;
use dist_schema::TripleNameRef;

use super::sortable_triple;
#[test]
Expand Down
14 changes: 7 additions & 7 deletions cargo-dist/src/backend/ci/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::collections::BTreeMap;
use axoasset::{LocalAsset, SourceFile};
use axoprocess::Cmd;
use camino::{Utf8Path, Utf8PathBuf};
use cargo_dist_schema::{
use dist_schema::{
target_lexicon::{self, Architecture, OperatingSystem, Triple},
AptPackageName, ChocolateyPackageName, ContainerImageRef, GhaRunStep, GithubGlobalJobConfig,
GithubLocalJobConfig, GithubMatrix, GithubRunnerConfig, GithubRunnerRef, GithubRunners,
Expand Down Expand Up @@ -66,9 +66,9 @@ pub struct GithubCiInfo {
/// Trigger releases on pushes to this branch instead of ci
pub release_branch: Option<String>,
/// Matrix for upload-local-artifacts
pub artifacts_matrix: cargo_dist_schema::GithubMatrix,
pub artifacts_matrix: dist_schema::GithubMatrix,
/// What kind of job to run on pull request
pub pr_run_mode: cargo_dist_schema::PrRunMode,
pub pr_run_mode: dist_schema::PrRunMode,
/// global task
pub global_task: GithubGlobalJobConfig,
/// homebrew tap
Expand Down Expand Up @@ -222,7 +222,7 @@ impl GithubCiInfo {
let mut dependencies = SystemDependencies::default();

let caching_could_be_profitable =
release_branch.is_some() || pr_run_mode == cargo_dist_schema::PrRunMode::Upload;
release_branch.is_some() || pr_run_mode == dist_schema::PrRunMode::Upload;
let cache_builds = cache_builds.unwrap_or(caching_could_be_profitable);

let need_cargo_auditable = dist.config.builds.cargo.cargo_auditable;
Expand Down Expand Up @@ -679,10 +679,10 @@ fn cargo_xwin() -> GithubRunnerConfig {
GithubRunnerConfig {
runner: GithubRunnerRef::from_str("ubuntu-20.04").to_owned(),
host: targets::TARGET_X64_LINUX_GNU.to_owned(),
container: Some(cargo_dist_schema::ContainerConfig {
container: Some(dist_schema::ContainerConfig {
image: ContainerImageRef::from_str("messense/cargo-xwin").to_owned(),
host: targets::TARGET_X64_LINUX_MUSL.to_owned(),
package_manager: Some(cargo_dist_schema::PackageManager::Apt),
package_manager: Some(dist_schema::PackageManager::Apt),
}),
}
}
Expand Down Expand Up @@ -743,7 +743,7 @@ fn system_deps_install_script(
// apt-using runners.
if rc.container.is_none()
|| rc.container.as_ref().and_then(|c| c.package_manager)
== Some(cargo_dist_schema::PackageManager::Apt)
== Some(dist_schema::PackageManager::Apt)
{
for (name, pkg) in &packages.apt {
if !pkg.0.stage_wanted(&DependencyKind::Build) {
Expand Down
4 changes: 2 additions & 2 deletions cargo-dist/src/backend/ci/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Support for generating CI scripts for running dist

use cargo_dist_schema::{
use dist_schema::{
target_lexicon::{OperatingSystem, Triple},
DashScript, GhaRunStep, PowershellScript,
};
Expand Down Expand Up @@ -101,7 +101,7 @@ impl DistInstallSettings<'_> {
}

let version = self.version;
let format = cargo_dist_schema::format_of_version(version);
let format = dist_schema::format_of_version(version);
let installer_name = if format.unsupported() {
// FIXME: we should probably do this check way higher up and produce a proper err...
panic!("requested dist v{version}, which is not supported by the this copy of dist ({SELF_DIST_VERSION})");
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/backend/installer/homebrew.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Code for generating formula.rb

use axoasset::LocalAsset;
use cargo_dist_schema::{ChecksumValue, DistManifest, HomebrewPackageName};
use dist_schema::{ChecksumValue, DistManifest, HomebrewPackageName};
use serde::Serialize;
use spdx::{
expression::{ExprNode, Operator},
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/backend/installer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::collections::BTreeMap;

use camino::Utf8PathBuf;
use cargo_dist_schema::{ArtifactId, EnvironmentVariables, Hosting, TripleName};
use dist_schema::{ArtifactId, EnvironmentVariables, Hosting, TripleName};
use homebrew::HomebrewFragments;
use macpkg::PkgInstallerInfo;
use serde::Serialize;
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/backend/installer/msi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use axoasset::{toml_edit, LocalAsset};
use camino::{Utf8Path, Utf8PathBuf};
use cargo_dist_schema::TripleName;
use dist_schema::TripleName;
use tracing::info;
use wix::print::{wxs::WxsRenders, RenderOutput};

Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/backend/installer/npm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use axoasset::{LocalAsset, SourceFile};
use camino::{Utf8Path, Utf8PathBuf};
use cargo_dist_schema::{ArtifactId, GlibcVersion, TripleName};
use dist_schema::{ArtifactId, GlibcVersion, TripleName};
use serde::Serialize;

use super::InstallerInfo;
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/backend/installer/shell.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Code for generating installer.sh

use axoasset::LocalAsset;
use cargo_dist_schema::DistManifest;
use dist_schema::DistManifest;

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

Expand Down
6 changes: 3 additions & 3 deletions cargo-dist/src/build/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::env;

use axoprocess::Cmd;
use axoproject::WorkspaceIdx;
use cargo_dist_schema::target_lexicon::{Architecture, Environment, Triple};
use cargo_dist_schema::{DistManifest, TripleName};
use dist_schema::target_lexicon::{Architecture, Environment, Triple};
use dist_schema::{DistManifest, TripleName};
use miette::{Context, IntoDiagnostic};
use tracing::warn;

Expand Down Expand Up @@ -272,7 +272,7 @@ pub fn build_cargo_target(
}

let auditable = dist_graph.config.builds.cargo.cargo_auditable;
let host = cargo_dist_schema::target_lexicon::HOST;
let host = dist_schema::target_lexicon::HOST;
let mut command =
make_build_cargo_target_command(&host, &cargo.cmd, &rustflags, step, auditable)?;

Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/build/fake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use axoasset::LocalAsset;
use camino::Utf8PathBuf;
use cargo_dist_schema::DistManifest;
use dist_schema::DistManifest;

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

Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/build/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{env, process::ExitStatus};
use axoprocess::Cmd;
use axoproject::WorkspaceIdx;
use camino::{Utf8Path, Utf8PathBuf};
use cargo_dist_schema::{DistManifest, TripleName, TripleNameRef};
use dist_schema::{DistManifest, TripleName, TripleNameRef};

use crate::{
build::{package_id_string, BuildExpectations},
Expand Down
Loading
Loading