diff --git a/src/generic.rs b/src/generic.rs index 754fa2a..b9a7687 100644 --- a/src/generic.rs +++ b/src/generic.rs @@ -6,12 +6,26 @@ use serde::Deserialize; use crate::{PackageInfo, Result, Version, WorkspaceInfo, WorkspaceSearch}; -#[derive(Deserialize)] -struct Manifest { +const DIST_PACKAGE_TOML: &str = "dist.toml"; +const DIST_WORKSPACE_TOML: &str = "dist-workspace.toml"; +const DIST_TARGET_DIR: &str = "target"; + +#[derive(Deserialize, Debug)] +struct WorkspaceManifest { + workspace: Workspace, +} + +#[derive(Deserialize, Debug)] +struct Workspace { + members: Vec, +} + +#[derive(Deserialize, Debug)] +struct PackageManifest { package: Package, } -#[derive(Deserialize)] +#[derive(Deserialize, Debug)] #[serde(rename_all = "kebab-case")] struct Package { name: String, @@ -39,33 +53,91 @@ struct Package { /// /// See [`crate::get_workspaces`][] for the semantics. pub fn get_workspace(start_dir: &Utf8Path, clamp_to_dir: Option<&Utf8Path>) -> WorkspaceSearch { - let manifest_path = match crate::find_file("dist.toml", start_dir, clamp_to_dir) { - Ok(path) => path, - Err(e) => return WorkspaceSearch::Missing(e), - }; - - match workspace_from(&manifest_path) { - Ok(info) => WorkspaceSearch::Found(info), - Err(e) => WorkspaceSearch::Broken { - manifest_path, - cause: e, + // First search for a workspace file + match crate::find_file(DIST_WORKSPACE_TOML, start_dir, clamp_to_dir) { + // Found a workspace file, read it + Ok(manifest_path) => match workspace_from(&manifest_path) { + Ok(info) => WorkspaceSearch::Found(info), + Err(e) => WorkspaceSearch::Broken { + manifest_path, + cause: e, + }, + }, + // No workspace file, maybe there's just a package? + Err(_) => match crate::find_file(DIST_PACKAGE_TOML, start_dir, clamp_to_dir) { + // Ok, make a faux-workspace from that + Ok(manifest_path) => match single_package_workspace_from(&manifest_path) { + Ok(info) => WorkspaceSearch::Found(info), + Err(e) => WorkspaceSearch::Broken { + manifest_path, + cause: e, + }, + }, + Err(e) => WorkspaceSearch::Missing(e), }, } } +// Load and process a dist-workspace.toml, and its child packages fn workspace_from(manifest_path: &Utf8Path) -> Result { + let manifest = load_workspace_dist_toml(manifest_path)?; let workspace_dir = manifest_path.parent().unwrap().to_path_buf(); let root_auto_includes = crate::find_auto_includes(&workspace_dir)?; - let manifest: Manifest = load_root_dist_toml(manifest_path)?; + let mut package_info = vec![]; + for member_reldir in &manifest.workspace.members { + let member_dir = workspace_dir.join(member_reldir); + let member_manifest_path = member_dir.join(DIST_PACKAGE_TOML); + let mut package = package_from(&member_manifest_path)?; + crate::merge_auto_includes(&mut package, &root_auto_includes); + package_info.push(package); + } + + Ok(WorkspaceInfo { + kind: crate::WorkspaceKind::Generic, + target_dir: workspace_dir.join(DIST_TARGET_DIR), + workspace_dir, + package_info, + manifest_path: manifest_path.to_owned(), + root_auto_includes, + warnings: vec![], + #[cfg(feature = "cargo-projects")] + cargo_metadata_table: None, + #[cfg(feature = "cargo-projects")] + cargo_profiles: crate::rust::CargoProfiles::new(), + }) +} + +// Load and process a dist.toml, and treat it as an entire workspace +fn single_package_workspace_from(manifest_path: &Utf8Path) -> Result { + let package = package_from(manifest_path)?; + let root_auto_includes = crate::find_auto_includes(&package.package_root)?; + Ok(WorkspaceInfo { + kind: crate::WorkspaceKind::Generic, + target_dir: package.package_root.join(DIST_TARGET_DIR), + workspace_dir: package.package_root.clone(), + manifest_path: package.manifest_path.clone(), + root_auto_includes, + package_info: vec![package], + warnings: vec![], + #[cfg(feature = "cargo-projects")] + cargo_metadata_table: None, + #[cfg(feature = "cargo-projects")] + cargo_profiles: Default::default(), + }) +} + +// Load and process a dist.toml +fn package_from(manifest_path: &Utf8Path) -> Result { + let manifest = load_package_dist_toml(manifest_path)?; let package = manifest.package; let version = package.version.map(Version::Generic); let manifest_path = manifest_path.to_path_buf(); - let package_info = PackageInfo { + let mut info = PackageInfo { manifest_path: manifest_path.clone(), - package_root: manifest_path.clone(), + package_root: manifest_path.parent().unwrap().to_owned(), name: package.name, version, description: package.description, @@ -82,31 +154,29 @@ fn workspace_from(manifest_path: &Utf8Path) -> Result { binaries: package.binaries, cstaticlibs: package.cstaticlibs, cdylibs: package.cdylibs, + build_command: Some(package.build_command), #[cfg(feature = "cargo-projects")] cargo_metadata_table: None, #[cfg(feature = "cargo-projects")] cargo_package_id: None, }; - Ok(WorkspaceInfo { - kind: crate::WorkspaceKind::Generic, - target_dir: workspace_dir.join("target"), - workspace_dir, - package_info: vec![package_info], - manifest_path, - repository_url: package.repository, - root_auto_includes, - warnings: vec![], - build_command: Some(package.build_command), - #[cfg(feature = "cargo-projects")] - cargo_metadata_table: None, - #[cfg(feature = "cargo-projects")] - cargo_profiles: crate::rust::CargoProfiles::new(), - }) + // Load and apply auto-includes + let auto_includes = crate::find_auto_includes(&info.package_root)?; + crate::merge_auto_includes(&mut info, &auto_includes); + + Ok(info) } /// Load the root workspace toml -fn load_root_dist_toml(manifest_path: &Utf8Path) -> Result { +fn load_workspace_dist_toml(manifest_path: &Utf8Path) -> Result { + let manifest_src = SourceFile::load_local(manifest_path)?; + let manifest = manifest_src.deserialize_toml()?; + Ok(manifest) +} + +/// Load the a package toml +fn load_package_dist_toml(manifest_path: &Utf8Path) -> Result { let manifest_src = SourceFile::load_local(manifest_path)?; let manifest = manifest_src.deserialize_toml()?; Ok(manifest) diff --git a/src/javascript.rs b/src/javascript.rs index ad5ab36..58da909 100644 --- a/src/javascript.rs +++ b/src/javascript.rs @@ -134,6 +134,8 @@ fn read_workspace(manifest_path: &Utf8Path) -> Result { cargo_metadata_table: None, #[cfg(feature = "cargo-projects")] cargo_package_id: None, + #[cfg(feature = "generic-projects")] + build_command: None, }; crate::merge_auto_includes(&mut info, &root_auto_includes); @@ -145,10 +147,8 @@ fn read_workspace(manifest_path: &Utf8Path) -> Result { workspace_dir: root, package_info, manifest_path: manifest_path.to_owned(), - repository_url, root_auto_includes, warnings: vec![], - build_command: None, #[cfg(feature = "cargo-projects")] cargo_metadata_table: None, #[cfg(feature = "cargo-projects")] diff --git a/src/lib.rs b/src/lib.rs index 7fe6d1e..e42b1ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -137,19 +137,12 @@ pub struct WorkspaceInfo { /// may or may not represent a "real" package. Both systems have some notion of /// "virtual" manifest which exists only to list the actual packages in the workspace. pub manifest_path: Utf8PathBuf, - /// A consensus URL for the repo according to the packages in the workspace - /// - /// If there are multiple packages in the workspace that specify a repository - /// but they disagree, this will be None. - pub repository_url: Option, /// If the workspace root has some auto-includeable files, here they are! /// /// This is currently what is use for top-level Announcement contents. pub root_auto_includes: AutoIncludes, /// Non-fatal issues that were encountered and should probably be reported pub warnings: Vec, - /// Build command to run for this workspace; not required for cargo - pub build_command: Option>, /// Raw cargo `[workspace.metadata]` table #[cfg(feature = "cargo-projects")] pub cargo_metadata_table: Option, @@ -176,8 +169,8 @@ impl WorkspaceInfo { } /// Returns a struct which contains the repository's owner and name. - pub fn github_repo(&self) -> Result> { - match self.repository_url.clone() { + pub fn github_repo(&self, packages: Option<&[PackageIdx]>) -> Result> { + match self.repository_url(packages)? { None => Ok(None), Some(url) => Ok(Some(GithubRepoInput::new(url)?.parse()?)), } @@ -185,8 +178,48 @@ impl WorkspaceInfo { /// Returns a web version of the repository URL, /// converted from SSH if necessary, with .git suffix trimmed. - pub fn web_url(&self) -> Result> { - Ok(self.github_repo()?.map(|repo| repo.web_url())) + pub fn web_url(&self, packages: Option<&[PackageIdx]>) -> Result> { + Ok(self.github_repo(packages)?.map(|repo| repo.web_url())) + } + + /// Returns a consensus package URL for the given packages, if any exists + pub fn repository_url(&self, packages: Option<&[PackageIdx]>) -> Result> { + let mut repo_url = None::; + let mut repo_url_origin = None::; + + let package_list = if let Some(packages) = packages { + packages + .iter() + .map(|idx| self.package(*idx)) + .collect::>() + } else { + self.package_info.iter().collect::>() + }; + for info in package_list { + if let Some(new_url) = &info.repository_url { + // Normalize away trailing `/` stuff before comparing + let mut normalized_new_url = new_url.clone(); + if normalized_new_url.ends_with('/') { + normalized_new_url.pop(); + } + if let Some(cur_url) = &repo_url { + if &normalized_new_url == cur_url { + // great! consensus! + } else { + return Err(AxoprojectError::InconsistentRepositoryKey { + file1: repo_url_origin.as_ref().unwrap().to_owned(), + url1: cur_url.clone(), + file2: info.manifest_path.clone(), + url2: normalized_new_url, + }); + } + } else { + repo_url = Some(normalized_new_url); + repo_url_origin = Some(info.manifest_path.clone()); + } + } + } + Ok(repo_url) } } @@ -300,6 +333,9 @@ pub struct PackageInfo { /// A unique id used by Cargo to refer to the package #[cfg(feature = "cargo-projects")] pub cargo_package_id: Option, + /// Command to run to build this package + #[cfg(feature = "generic-projects")] + pub build_command: Option>, } impl PackageInfo { diff --git a/src/rust.rs b/src/rust.rs index dbe60e6..7442896 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -2,10 +2,7 @@ use std::collections::BTreeMap; -use crate::{ - errors::AxoprojectError, PackageInfo, Result, Version, WorkspaceInfo, WorkspaceKind, - WorkspaceSearch, -}; +use crate::{PackageInfo, Result, Version, WorkspaceInfo, WorkspaceKind, WorkspaceSearch}; use axoasset::SourceFile; use camino::{Utf8Path, Utf8PathBuf}; use guppy::{ @@ -63,7 +60,7 @@ fn package_graph(start_dir: &Utf8Path) -> Result { fn workspace_info(pkg_graph: &PackageGraph) -> Result { let workspace = pkg_graph.workspace(); let members = pkg_graph.resolve_workspace(); - let mut warnings = vec![]; + let warnings = vec![]; let manifest_path = workspace.root().join("Cargo.toml"); // I originally had this as a proper Error but honestly this would be MADNESS and @@ -78,45 +75,10 @@ fn workspace_info(pkg_graph: &PackageGraph) -> Result { let cargo_metadata_table = Some(workspace.metadata_table().clone()); let workspace_root = workspace.root(); let root_auto_includes = crate::find_auto_includes(workspace_root)?; - - let mut repo_url_conflicted = false; - let mut repo_url = None::; - let mut repo_url_origin = None::; let mut all_package_info = vec![]; for package in members.packages(DependencyDirection::Forward) { let mut info = package_info(workspace_root, &package)?; - - // Apply root workspace's auto-includes crate::merge_auto_includes(&mut info, &root_auto_includes); - - // Try to find repo URL consensus - if !repo_url_conflicted { - if let Some(new_url) = &info.repository_url { - // Normalize away trailing `/` stuff before comparing - let mut normalized_new_url = new_url.clone(); - if normalized_new_url.ends_with('/') { - normalized_new_url.pop(); - } - if let Some(cur_url) = &repo_url { - if &normalized_new_url == cur_url { - // great! consensus! - } else { - warnings.push(AxoprojectError::InconsistentRepositoryKey { - file1: repo_url_origin.as_ref().unwrap().to_owned(), - url1: cur_url.clone(), - file2: info.manifest_path.clone(), - url2: normalized_new_url, - }); - repo_url_conflicted = true; - repo_url = None; - } - } else { - repo_url = Some(normalized_new_url); - repo_url_origin = Some(info.manifest_path.clone()); - } - } - } - all_package_info.push(info); } @@ -129,14 +91,11 @@ fn workspace_info(pkg_graph: &PackageGraph) -> Result { workspace_dir, package_info: all_package_info, manifest_path, - - repository_url: repo_url, root_auto_includes, cargo_metadata_table, cargo_profiles, warnings, - build_command: None, }) } @@ -259,6 +218,8 @@ fn package_info(_workspace_root: &Utf8Path, package: &PackageMetadata) -> Result cstaticlibs, cargo_metadata_table, cargo_package_id, + #[cfg(feature = "generic-projects")] + build_command: None, }; // Find files we might want to auto-include diff --git a/src/tests.rs b/src/tests.rs index ea6b072..532852a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,6 +1,8 @@ -use camino::Utf8PathBuf; +use camino::{Utf8Path, Utf8PathBuf}; -use crate::{changelog::ChangelogInfo, errors::AxoprojectError, Version, WorkspaceKind}; +use crate::{ + changelog::ChangelogInfo, errors::AxoprojectError, PackageIdx, Version, WorkspaceKind, +}; #[cfg(feature = "cargo-projects")] #[test] @@ -564,11 +566,101 @@ fn test_generic_c() { .unwrap(); assert_eq!(project.kind, WorkspaceKind::Generic); assert_eq!(project.package_info.len(), 1); + assert!(project.manifest_path.exists()); let package = &project.package_info[0]; assert_eq!(package.name, "testprog"); assert_eq!(package.binaries.len(), 1); + assert!(project.manifest_path.exists()); let binary = &package.binaries[0]; assert_eq!(binary, "main"); } + +#[test] +fn test_generic_workspace_root() { + generic_workspace_check("tests/projects/generic-workspace") +} + +#[test] +fn test_generic_workspace_subdir() { + generic_workspace_check("tests/projects/generic-workspace/generic1/") +} + +fn generic_workspace_check<'a>(path: impl Into<&'a Utf8Path>) { + let project = crate::get_workspaces(path.into(), None).best().unwrap(); + assert_eq!(project.kind, WorkspaceKind::Generic); + assert_eq!(project.package_info.len(), 2); + assert!(project.manifest_path.exists()); + check_file( + project.root_auto_includes.readme.as_deref().unwrap(), + "root fake readme!", + ); + check_file( + &project.root_auto_includes.licenses[0], + "root fake license!", + ); + check_file( + project.root_auto_includes.changelog.as_deref().unwrap(), + "root fake changelog!", + ); + // repository is inconsistent, so this should be Err + assert!(project.repository_url(None).is_err()); + + { + let package = &project.package_info[0]; + assert_eq!(package.name, "generic1"); + assert_eq!(package.binaries.len(), 1); + let binary = &package.binaries[0]; + assert_eq!(binary, "main"); + assert!(package.manifest_path.exists()); + assert!(package.manifest_path != project.manifest_path); + // Inner package defines its own auto_includes + check_file( + package.readme_file.as_deref().unwrap(), + "inner fake readme!", + ); + check_file(&package.license_files[0], "inner fake license!"); + check_file( + package.changelog_file.as_deref().unwrap(), + "inner fake changelog!", + ); + // repository should yield this one, so this should faile + assert_eq!( + project + .repository_url(Some(&[PackageIdx(0)])) + .unwrap() + .unwrap(), + "https://github.com/mistydemeo/testprog1" + ); + } + + { + let package = &project.package_info[1]; + assert_eq!(package.name, "generic2"); + assert_eq!(package.binaries.len(), 1); + let binary = &package.binaries[0]; + assert_eq!(binary, "main"); + assert!(package.manifest_path.exists()); + assert!(package.manifest_path != project.manifest_path); + // Inner package inherits root auto_includes + check_file(package.readme_file.as_deref().unwrap(), "root fake readme!"); + check_file(&package.license_files[0], "root fake license!"); + check_file( + package.changelog_file.as_deref().unwrap(), + "root fake changelog!", + ); + assert_eq!( + project + .repository_url(Some(&[PackageIdx(1)])) + .unwrap() + .unwrap(), + "https://github.com/mistydemeo/testprog2" + ); + } +} + +#[track_caller] +fn check_file(file: &Utf8Path, val: &str) { + assert!(axoasset::LocalAsset::load_string(file).unwrap().trim() == val) +} diff --git a/tests/projects/generic-workspace/CHANGELOG.md b/tests/projects/generic-workspace/CHANGELOG.md new file mode 100644 index 0000000..4b5e9e7 --- /dev/null +++ b/tests/projects/generic-workspace/CHANGELOG.md @@ -0,0 +1 @@ +root fake changelog! diff --git a/tests/projects/generic-workspace/LICENSE.txt b/tests/projects/generic-workspace/LICENSE.txt new file mode 100644 index 0000000..4b46362 --- /dev/null +++ b/tests/projects/generic-workspace/LICENSE.txt @@ -0,0 +1 @@ +root fake license! diff --git a/tests/projects/generic-workspace/README.md b/tests/projects/generic-workspace/README.md new file mode 100644 index 0000000..b7dc76f --- /dev/null +++ b/tests/projects/generic-workspace/README.md @@ -0,0 +1 @@ +root fake readme! diff --git a/tests/projects/generic-workspace/dist-workspace.toml b/tests/projects/generic-workspace/dist-workspace.toml new file mode 100644 index 0000000..d85a880 --- /dev/null +++ b/tests/projects/generic-workspace/dist-workspace.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["generic1", "generic2"] diff --git a/tests/projects/generic-workspace/generic1/CHANGELOG.md b/tests/projects/generic-workspace/generic1/CHANGELOG.md new file mode 100644 index 0000000..5fcb5c6 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/CHANGELOG.md @@ -0,0 +1 @@ +inner fake changelog! \ No newline at end of file diff --git a/tests/projects/generic-workspace/generic1/LICENSE.txt b/tests/projects/generic-workspace/generic1/LICENSE.txt new file mode 100644 index 0000000..b2f1771 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/LICENSE.txt @@ -0,0 +1 @@ +inner fake license! diff --git a/tests/projects/generic-workspace/generic1/Makefile b/tests/projects/generic-workspace/generic1/Makefile new file mode 100644 index 0000000..2b10616 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/Makefile @@ -0,0 +1,13 @@ +CC := gcc +RM := rm +EXEEXT := + +all: main$(EXEEXT) + +main$(EXEEXT): + $(CC) main.c -o main$(EXEEXT) + +clean: + $(RM) -f main$(EXEEXT) + +.PHONY: all clean diff --git a/tests/projects/generic-workspace/generic1/README.md b/tests/projects/generic-workspace/generic1/README.md new file mode 100644 index 0000000..83f4981 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/README.md @@ -0,0 +1 @@ +inner fake readme! diff --git a/tests/projects/generic-workspace/generic1/dist.toml b/tests/projects/generic-workspace/generic1/dist.toml new file mode 100644 index 0000000..e1ffdd3 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/dist.toml @@ -0,0 +1,47 @@ +[package] +name = "generic1" +description = "A test of a C program for cargo-dist" +version = "0.0.1" +license = "WTFPL" +repository = "https://github.com/mistydemeo/testprog1" +binaries = ["main"] +build-command = ["make"] + +# Config for 'cargo dist' +[workspace.metadata.dist] +# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) +cargo-dist-version = "0.4.2" +# CI backends to support +ci = ["github"] +# The installers to generate for each app +installers = ["shell", "homebrew"] +# Target platforms to build apps for (Rust target-triple syntax) +targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-musl"] +# The archive format to use for windows builds (defaults .zip) +windows-archive = ".tar.gz" +# The archive format to use for non-windows builds (defaults .tar.xz) +unix-archive = ".tar.gz" +# A namespace to use when publishing this package to the npm registry +npm-scope = "@axodotdev" +# A GitHub repo to push Homebrew formulas to +tap = "mistydemeo/homebrew-cargodisttest" +# Publish jobs to run in CI +publish-jobs = ["homebrew"] +# Whether cargo-dist should create a Github Release or use an existing draft +create-release = false +# Whether to publish prereleases to package managers +publish-prereleases = true +# Publish jobs to run in CI +pr-run-mode = "plan" + +[workspace.metadata.dist.dependencies.homebrew] +cmake = { targets = ["x86_64-apple-darwin"] } +libcue = { version = "2.2.1", targets = ["x86_64-apple-darwin"] } + +[workspace.metadata.dist.dependencies.apt] +cmake = '*' +libcue-dev = { version = "2.2.1-2" } + +[workspace.metadata.dist.dependencies.chocolatey] +lftp = '*' +cmake = '3.27.6' diff --git a/tests/projects/generic-workspace/generic1/main.c b/tests/projects/generic-workspace/generic1/main.c new file mode 100644 index 0000000..cc27795 --- /dev/null +++ b/tests/projects/generic-workspace/generic1/main.c @@ -0,0 +1,3 @@ +#include + +int main() { puts("Hello, cargo-dist!"); } diff --git a/tests/projects/generic-workspace/generic2/Makefile b/tests/projects/generic-workspace/generic2/Makefile new file mode 100644 index 0000000..2b10616 --- /dev/null +++ b/tests/projects/generic-workspace/generic2/Makefile @@ -0,0 +1,13 @@ +CC := gcc +RM := rm +EXEEXT := + +all: main$(EXEEXT) + +main$(EXEEXT): + $(CC) main.c -o main$(EXEEXT) + +clean: + $(RM) -f main$(EXEEXT) + +.PHONY: all clean diff --git a/tests/projects/generic-workspace/generic2/dist.toml b/tests/projects/generic-workspace/generic2/dist.toml new file mode 100644 index 0000000..16f3858 --- /dev/null +++ b/tests/projects/generic-workspace/generic2/dist.toml @@ -0,0 +1,47 @@ +[package] +name = "generic2" +description = "A test of a C program for cargo-dist" +version = "0.0.1" +license = "WTFPL" +repository = "https://github.com/mistydemeo/testprog2" +binaries = ["main"] +build-command = ["make"] + +# Config for 'cargo dist' +[workspace.metadata.dist] +# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) +cargo-dist-version = "0.4.2" +# CI backends to support +ci = ["github"] +# The installers to generate for each app +installers = ["shell", "homebrew"] +# Target platforms to build apps for (Rust target-triple syntax) +targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-musl"] +# The archive format to use for windows builds (defaults .zip) +windows-archive = ".tar.gz" +# The archive format to use for non-windows builds (defaults .tar.xz) +unix-archive = ".tar.gz" +# A namespace to use when publishing this package to the npm registry +npm-scope = "@axodotdev" +# A GitHub repo to push Homebrew formulas to +tap = "mistydemeo/homebrew-cargodisttest" +# Publish jobs to run in CI +publish-jobs = ["homebrew"] +# Whether cargo-dist should create a Github Release or use an existing draft +create-release = false +# Whether to publish prereleases to package managers +publish-prereleases = true +# Publish jobs to run in CI +pr-run-mode = "plan" + +[workspace.metadata.dist.dependencies.homebrew] +cmake = { targets = ["x86_64-apple-darwin"] } +libcue = { version = "2.2.1", targets = ["x86_64-apple-darwin"] } + +[workspace.metadata.dist.dependencies.apt] +cmake = '*' +libcue-dev = { version = "2.2.1-2" } + +[workspace.metadata.dist.dependencies.chocolatey] +lftp = '*' +cmake = '3.27.6' diff --git a/tests/projects/generic-workspace/generic2/main.c b/tests/projects/generic-workspace/generic2/main.c new file mode 100644 index 0000000..cc27795 --- /dev/null +++ b/tests/projects/generic-workspace/generic2/main.c @@ -0,0 +1,3 @@ +#include + +int main() { puts("Hello, cargo-dist!"); }