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

(config-migration) Add do_migrate_from_v0() implementation #1725

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

duckinator
Copy link
Contributor

@duckinator duckinator commented Jan 23, 2025

starting Cargo.toml
[package]
name = "axolotlsay"
description = "💬 a CLI for learning to distribute CLIs in rust"
version = "0.2.275"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/mistydemeo/cargodisttest.git"
homepage = "https://github.com/mistydemeo/cargodisttest"

[dependencies]
clap = { version = "4.1.4", features = ["derive"] }
unicode-width = "0.1.10"

[dev-dependencies]
assert_cmd = "2.0.8"

# Config for 'dist'
[workspace.metadata.dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.25.1"
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell", "powershell"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
# Which actions to run on pull requests
pr-run-mode = "plan"
# Where to host releases
hosting = "github"
# Whether to install an updater program
install-updater = true
# Whether to enable GitHub Attestations
#github-attestations = true
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to sign macOS executables
macos-sign = false
# Whether to embed dependency information using cargo-auditable
cargo-auditable = true

[workspace.metadata.dist.aliases]
axolotlsay = ["cargodisttest"]

[workspace.metadata.dist.dependencies.homebrew]
cmake = '*'
libcue = "2.2.1"

[workspace.metadata.dist.dependencies.apt]
cmake = '*'
libcue-dev = '*'

[workspace.metadata.dist.dependencies.chocolatey]
lftp = '*'
cmake = '3.27.6'

[workspace.metadata.dist.github-custom-runners]
x86_64-unknown-linux-gnu = "ubuntu-latest"
dist migrate (without DIST_V1=true)
~/dev/axodotdev/cargodisttest main+ dist migrate
migrating dist config from Cargo.toml to dist-workspace.toml...
~/dev/axodotdev/cargodisttest main+ git --no-pager diff
diff --git a/Cargo.toml b/Cargo.toml
index be3df3e..839cb04 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,46 +13,3 @@ unicode-width = "0.1.10"
 
 [dev-dependencies]
 assert_cmd = "2.0.8"
-
-# Config for 'dist'
-[workspace.metadata.dist]
-# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
-cargo-dist-version = "0.25.1"
-# CI backends to support
-ci = "github"
-# The installers to generate for each app
-installers = ["shell", "powershell"]
-# Target platforms to build apps for (Rust target-triple syntax)
-targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
-# Which actions to run on pull requests
-pr-run-mode = "plan"
-# Where to host releases
-hosting = "github"
-# Whether to install an updater program
-install-updater = true
-# Whether to enable GitHub Attestations
-#github-attestations = true
-# Path that installers should place binaries in
-install-path = "CARGO_HOME"
-# Whether to sign macOS executables
-macos-sign = false
-# Whether to embed dependency information using cargo-auditable
-cargo-auditable = true
-
-[workspace.metadata.dist.aliases]
-axolotlsay = ["cargodisttest"]
-
-[workspace.metadata.dist.dependencies.homebrew]
-cmake = '*'
-libcue = "2.2.1"
-
-[workspace.metadata.dist.dependencies.apt]
-cmake = '*'
-libcue-dev = '*'
-
-[workspace.metadata.dist.dependencies.chocolatey]
-lftp = '*'
-cmake = '3.27.6'
-
-[workspace.metadata.dist.github-custom-runners]
-x86_64-unknown-linux-gnu = "ubuntu-latest"
~/dev/axodotdev/cargodisttest main+ cat dist-workspace.toml 
[workspace]
members = ["cargo:."]

# Config for 'dist'
[dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.25.1"
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell", "powershell"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
# Which actions to run on pull requests
pr-run-mode = "plan"
# Where to host releases
hosting = "github"
# Whether to install an updater program
install-updater = true
# Whether to enable GitHub Attestations
#github-attestations = true
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to sign macOS executables
macos-sign = false
# Whether to embed dependency information using cargo-auditable
cargo-auditable = true

[dist.aliases]
axolotlsay = ["cargodisttest"]

[dist.dependencies.homebrew]
cmake = '*'
libcue = "2.2.1"

[dist.dependencies.apt]
cmake = '*'
libcue-dev = '*'

[dist.dependencies.chocolatey]
lftp = '*'
cmake = '3.27.6'

[dist.github-custom-runners]
x86_64-unknown-linux-gnu = "ubuntu-latest"
~/dev/axodotdev/cargodisttest main+
DIST_V1=true dist migrate
~/dev/axodotdev/cargodisttest main+ DIST_V1=true dist migrate                                 
migrating dist config from V0 to V1 format...
~/dev/axodotdev/cargodisttest main+ cat dist-workspace.toml
[workspace]
members = ["cargo:."]

[dist]
dist-version = "1.0.0-rc.1"
config-version = "1"
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]

[dist.builds]
macos-sign = false

[dist.builds.cargo]
cargo-auditable = true

[dist.builds.dependencies.homebrew.cmake]
stage = []
targets = []

[dist.builds.dependencies.homebrew.libcue]
version = "2.2.1"
stage = []
targets = []

[dist.builds.dependencies.apt.cmake]
stage = []
targets = []

[dist.builds.dependencies.apt.libcue-dev]
stage = []
targets = []

[dist.builds.dependencies.chocolatey.cmake]
version = "3.27.6"
stage = []
targets = []

[dist.builds.dependencies.chocolatey.lftp]
stage = []
targets = []

[dist.ci]
pr-run-mode = "plan"

[dist.ci.github.runners]
x86_64-unknown-linux-gnu = "ubuntu-latest"

[dist.hosts]
github = true

[dist.installers]
install-path = "CARGO_HOME"
powershell = true
shell = true
updater = true

~/dev/axodotdev/cargodisttest main+ 

@duckinator duckinator force-pushed the migrate-from-v0 branch 3 times, most recently from 30c9a66 to 924c3ec Compare January 25, 2025 03:45
@duckinator

This comment was marked as resolved.

@duckinator duckinator marked this pull request as ready for review January 27, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant