Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb51be0732 | ||
|
|
56a717dcc6 | ||
|
|
ee353ccb66 | ||
|
|
33cea0e5b6 | ||
|
|
78a491a976 | ||
|
|
9553be04e4 | ||
|
|
81928f55a2 | ||
|
|
4e56bf07f3 | ||
|
|
9f424f03c3 | ||
|
|
1e14b3bf28 | ||
|
|
51e7a31f48 | ||
|
|
9847fd9d4d | ||
|
|
24ef44291f | ||
|
|
ebb0c5a6d8 | ||
|
|
1dee462175 | ||
|
|
dc82b8b766 | ||
|
|
73888e7669 | ||
|
|
46a010cc8f |
72
Cargo.lock
generated
72
Cargo.lock
generated
@@ -379,9 +379,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxx"
|
name = "cxx"
|
||||||
version = "1.0.82"
|
version = "1.0.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453"
|
checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cxxbridge-flags",
|
"cxxbridge-flags",
|
||||||
@@ -391,9 +391,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxx-build"
|
name = "cxx-build"
|
||||||
version = "1.0.82"
|
version = "1.0.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0"
|
checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"codespan-reporting",
|
"codespan-reporting",
|
||||||
@@ -406,15 +406,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxxbridge-flags"
|
name = "cxxbridge-flags"
|
||||||
version = "1.0.82"
|
version = "1.0.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71"
|
checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxxbridge-macro"
|
name = "cxxbridge-macro"
|
||||||
version = "1.0.82"
|
version = "1.0.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470"
|
checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -721,9 +721,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "h2"
|
name = "h2"
|
||||||
version = "0.3.12"
|
version = "0.3.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b"
|
checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"fnv",
|
"fnv",
|
||||||
@@ -957,9 +957,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.137"
|
version = "0.2.138"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "link-cplusplus"
|
name = "link-cplusplus"
|
||||||
@@ -1083,9 +1083,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.23.1"
|
version = "0.23.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
|
checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cc",
|
"cc",
|
||||||
@@ -1096,9 +1096,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.24.2"
|
version = "0.24.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"
|
checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -1661,18 +1661,18 @@ checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.148"
|
version = "1.0.149"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc"
|
checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.148"
|
version = "1.0.149"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c"
|
checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -1849,9 +1849,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.104"
|
version = "1.0.105"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
|
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -2003,9 +2003,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.5.1"
|
version = "1.8.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cd3b82e6e823a9ee7d7f64b08f8ac3d5f08ac988f23157194bd32af3f2f92767"
|
checksum = "cdc46ca74dd45faeaaf96a8fbe2406f425829705ee62100ccaa9b34a2145cff8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -2032,16 +2032,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-util"
|
name = "tokio-util"
|
||||||
version = "0.6.9"
|
version = "0.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0"
|
checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
"log",
|
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2055,7 +2055,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "topgrade"
|
name = "topgrade"
|
||||||
version = "10.2.1"
|
version = "10.2.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -2070,7 +2070,7 @@ dependencies = [
|
|||||||
"home",
|
"home",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"nix 0.24.2",
|
"nix 0.24.3",
|
||||||
"notify-rust",
|
"notify-rust",
|
||||||
"parselnk",
|
"parselnk",
|
||||||
"regex",
|
"regex",
|
||||||
@@ -2582,7 +2582,7 @@ dependencies = [
|
|||||||
"futures-util",
|
"futures-util",
|
||||||
"hex",
|
"hex",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"nix 0.23.1",
|
"nix 0.23.2",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"ordered-stream",
|
"ordered-stream",
|
||||||
"rand",
|
"rand",
|
||||||
@@ -2613,9 +2613,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zbus_names"
|
name = "zbus_names"
|
||||||
version = "2.3.0"
|
version = "2.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d69bb79b44e1901ed8b217e485d0f01991aec574479b68cb03415f142bc7ae67"
|
checksum = "6c737644108627748a660d038974160e0cbb62605536091bdfa28fd7f64d43c8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
@@ -2637,9 +2637,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zvariant"
|
name = "zvariant"
|
||||||
version = "3.8.0"
|
version = "3.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5c817f416f05fcbc833902f1e6064b72b1778573978cfeac54731451ccc9e207"
|
checksum = "56f8c89c183461e11867ded456db252eae90874bc6769b7adbea464caa777e51"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"enumflags2",
|
"enumflags2",
|
||||||
@@ -2651,9 +2651,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zvariant_derive"
|
name = "zvariant_derive"
|
||||||
version = "3.8.0"
|
version = "3.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fdd24fffd02794a76eb10109de463444064c88f5adb9e9d1a78488adc332bfef"
|
checksum = "155247a5d1ab55e335421c104ccd95d64f17cebbd02f50cdbc1c33385f9c4d81"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|||||||
10
Cargo.toml
10
Cargo.toml
@@ -6,7 +6,7 @@ keywords = ["upgrade", "update"]
|
|||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
# license-file = "LICENSE"
|
# license-file = "LICENSE"
|
||||||
repository = "https://github.com/topgrade-rs/topgrade"
|
repository = "https://github.com/topgrade-rs/topgrade"
|
||||||
version = "10.2.1"
|
version = "10.2.3"
|
||||||
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
|
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
|
||||||
exclude = ["doc/screenshot.gif"]
|
exclude = ["doc/screenshot.gif"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -39,14 +39,14 @@ strum = { version = "~0.24", features = ["derive"] }
|
|||||||
thiserror = "~1.0"
|
thiserror = "~1.0"
|
||||||
tempfile = "~3.2"
|
tempfile = "~3.2"
|
||||||
cfg-if = "~1.0"
|
cfg-if = "~1.0"
|
||||||
tokio = { version = "~1.5", features = ["process", "rt-multi-thread"] }
|
tokio = { version = "~1.8", features = ["process", "rt-multi-thread"] }
|
||||||
futures = "~0.3"
|
futures = "~0.3"
|
||||||
regex = "~1.5"
|
regex = "~1.5"
|
||||||
semver = "~1.0"
|
semver = "~1.0"
|
||||||
shell-words = "~1.1"
|
shell-words = "~1.1"
|
||||||
color-eyre = "0.6.2"
|
color-eyre = "~0.6"
|
||||||
tracing = { version = "0.1.37", features = ["attributes", "log"] }
|
tracing = { version = "~0.1", features = ["attributes", "log"] }
|
||||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "time"] }
|
tracing-subscriber = { version = "~0.3", features = ["env-filter", "time"] }
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
notify-rust = "~4.5"
|
notify-rust = "~4.5"
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ type Commands = BTreeMap<String, String>;
|
|||||||
pub enum Step {
|
pub enum Step {
|
||||||
Asdf,
|
Asdf,
|
||||||
Atom,
|
Atom,
|
||||||
|
Bin,
|
||||||
BrewCask,
|
BrewCask,
|
||||||
BrewFormula,
|
BrewFormula,
|
||||||
Bun,
|
Bun,
|
||||||
Bin,
|
|
||||||
Cargo,
|
Cargo,
|
||||||
Chezmoi,
|
Chezmoi,
|
||||||
Chocolatey,
|
Chocolatey,
|
||||||
@@ -87,8 +87,8 @@ pub enum Step {
|
|||||||
Containers,
|
Containers,
|
||||||
CustomCommands,
|
CustomCommands,
|
||||||
DebGet,
|
DebGet,
|
||||||
Distrobox,
|
|
||||||
Deno,
|
Deno,
|
||||||
|
Distrobox,
|
||||||
Dotnet,
|
Dotnet,
|
||||||
Emacs,
|
Emacs,
|
||||||
Firmware,
|
Firmware,
|
||||||
@@ -100,15 +100,17 @@ pub enum Step {
|
|||||||
Ghcup,
|
Ghcup,
|
||||||
GithubCliExtensions,
|
GithubCliExtensions,
|
||||||
GitRepos,
|
GitRepos,
|
||||||
|
GnomeShellExtensions,
|
||||||
Go,
|
Go,
|
||||||
Guix,
|
Guix,
|
||||||
Haxelib,
|
Haxelib,
|
||||||
GnomeShellExtensions,
|
Helm,
|
||||||
HomeManager,
|
HomeManager,
|
||||||
Jetpack,
|
Jetpack,
|
||||||
Julia,
|
Julia,
|
||||||
Juliaup,
|
Juliaup,
|
||||||
Kakoune,
|
Kakoune,
|
||||||
|
Helix,
|
||||||
Krew,
|
Krew,
|
||||||
Macports,
|
Macports,
|
||||||
Mas,
|
Mas,
|
||||||
@@ -120,10 +122,11 @@ pub enum Step {
|
|||||||
Pacdef,
|
Pacdef,
|
||||||
Pacstall,
|
Pacstall,
|
||||||
Pearl,
|
Pearl,
|
||||||
Pipx,
|
|
||||||
Pip3,
|
Pip3,
|
||||||
|
Pipx,
|
||||||
Pkg,
|
Pkg,
|
||||||
Pkgin,
|
Pkgin,
|
||||||
|
Pnpm,
|
||||||
Powershell,
|
Powershell,
|
||||||
Protonup,
|
Protonup,
|
||||||
Raco,
|
Raco,
|
||||||
@@ -152,6 +155,7 @@ pub enum Step {
|
|||||||
Winget,
|
Winget,
|
||||||
Wsl,
|
Wsl,
|
||||||
Yadm,
|
Yadm,
|
||||||
|
Yarn,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Debug)]
|
#[derive(Deserialize, Default, Debug)]
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Go, "gup", || go::run_go_gup(run_type))?;
|
runner.execute(Step::Go, "gup", || go::run_go_gup(run_type))?;
|
||||||
runner.execute(Step::Emacs, "Emacs", || emacs.upgrade(&ctx))?;
|
runner.execute(Step::Emacs, "Emacs", || emacs.upgrade(&ctx))?;
|
||||||
runner.execute(Step::Opam, "opam", || generic::run_opam_update(&ctx))?;
|
runner.execute(Step::Opam, "opam", || generic::run_opam_update(&ctx))?;
|
||||||
runner.execute(Step::Vcpkg, "vcpkg", || generic::run_vcpkg_update(run_type))?;
|
runner.execute(Step::Vcpkg, "vcpkg", || generic::run_vcpkg_update(&ctx))?;
|
||||||
runner.execute(Step::Pipx, "pipx", || generic::run_pipx_update(run_type))?;
|
runner.execute(Step::Pipx, "pipx", || generic::run_pipx_update(run_type))?;
|
||||||
runner.execute(Step::Conda, "conda", || generic::run_conda_update(&ctx))?;
|
runner.execute(Step::Conda, "conda", || generic::run_conda_update(&ctx))?;
|
||||||
runner.execute(Step::Pip3, "pip3", || generic::run_pip3_update(run_type))?;
|
runner.execute(Step::Pip3, "pip3", || generic::run_pip3_update(run_type))?;
|
||||||
@@ -367,13 +367,15 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Vim, "The Ultimate vimrc", || vim::upgrade_ultimate_vimrc(&ctx))?;
|
runner.execute(Step::Vim, "The Ultimate vimrc", || vim::upgrade_ultimate_vimrc(&ctx))?;
|
||||||
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::Kakoune, "Kakoune", || kakoune::upgrade_kak_plug(&ctx))?;
|
runner.execute(Step::Kakoune, "Kakoune", || kakoune::upgrade_kak_plug(&ctx))?;
|
||||||
|
runner.execute(Step::Helix, "helix", || generic::run_helix_grammars(&ctx))?;
|
||||||
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Node, "yarn", || node::run_yarn_upgrade(&ctx))?;
|
runner.execute(Step::Yarn, "yarn", || node::run_yarn_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Node, "pnpm", || node::run_pnpm_upgrade(&ctx))?;
|
runner.execute(Step::Pnpm, "pnpm", || node::run_pnpm_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Containers, "Containers", || containers::run_containers(&ctx))?;
|
runner.execute(Step::Containers, "Containers", || containers::run_containers(&ctx))?;
|
||||||
runner.execute(Step::Deno, "deno", || node::deno_upgrade(&ctx))?;
|
runner.execute(Step::Deno, "deno", || node::deno_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Composer, "composer", || generic::run_composer_update(&ctx))?;
|
runner.execute(Step::Composer, "composer", || generic::run_composer_update(&ctx))?;
|
||||||
runner.execute(Step::Krew, "krew", || generic::run_krew_upgrade(run_type))?;
|
runner.execute(Step::Krew, "krew", || generic::run_krew_upgrade(run_type))?;
|
||||||
|
runner.execute(Step::Helm, "helm", || generic::run_helm_repo_update(run_type))?;
|
||||||
runner.execute(Step::Gem, "gem", || generic::run_gem(&base_dirs, run_type))?;
|
runner.execute(Step::Gem, "gem", || generic::run_gem(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::RubyGems, "rubygems", || {
|
runner.execute(Step::RubyGems, "rubygems", || {
|
||||||
generic::run_rubygems(&base_dirs, run_type)
|
generic::run_rubygems(&base_dirs, run_type)
|
||||||
|
|||||||
@@ -89,15 +89,11 @@ pub fn run_rubygems(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||||||
|
|
||||||
print_separator("RubyGems");
|
print_separator("RubyGems");
|
||||||
|
|
||||||
let mut command = run_type.execute(gem);
|
if !std::path::Path::new("/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb").exists() {
|
||||||
command.arg("update --system");
|
run_type.execute(gem).args(["update", "--system"]).status_checked()
|
||||||
|
} else {
|
||||||
if env::var_os("RBENV_SHELL").is_none() {
|
Ok(())
|
||||||
debug!("Detected rbenv. Avoiding --user-install");
|
|
||||||
command.arg("--user-install");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
command.status_checked()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_haxelib_update(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_haxelib_update(ctx: &ExecutionContext) -> Result<()> {
|
||||||
@@ -268,14 +264,27 @@ pub fn run_opam_update(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_vcpkg_update(run_type: RunType) -> Result<()> {
|
pub fn run_vcpkg_update(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let vcpkg = utils::require("vcpkg")?;
|
let vcpkg = utils::require("vcpkg")?;
|
||||||
print_separator("vcpkg");
|
print_separator("vcpkg");
|
||||||
|
|
||||||
run_type
|
#[cfg(unix)]
|
||||||
.execute(vcpkg)
|
let is_root_install = !&vcpkg.starts_with("/home");
|
||||||
.args(["upgrade", "--no-dry-run"])
|
|
||||||
.status_checked()
|
#[cfg(not(unix))]
|
||||||
|
let is_root_install = false;
|
||||||
|
|
||||||
|
let mut command = if is_root_install {
|
||||||
|
ctx.run_type().execute(&vcpkg)
|
||||||
|
} else {
|
||||||
|
let mut c = ctx
|
||||||
|
.run_type()
|
||||||
|
.execute(ctx.sudo().as_ref().ok_or(TopgradeError::SudoRequired)?);
|
||||||
|
c.arg(&vcpkg);
|
||||||
|
c
|
||||||
|
};
|
||||||
|
|
||||||
|
command.args(["upgrade", "--no-dry-run"]).status_checked()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_pipx_update(run_type: RunType) -> Result<()> {
|
pub fn run_pipx_update(run_type: RunType) -> Result<()> {
|
||||||
@@ -479,30 +488,53 @@ pub fn run_composer_update(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
pub fn run_dotnet_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_dotnet_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let dotnet = utils::require("dotnet")?;
|
let dotnet = utils::require("dotnet")?;
|
||||||
|
|
||||||
let output = Command::new(dotnet)
|
let dotnet_help_output = ctx.run_type().execute(&dotnet).arg("-h").output().err().unwrap();
|
||||||
.args(["tool", "list", "--global"])
|
|
||||||
.output_checked_utf8()?;
|
|
||||||
|
|
||||||
if !output.stdout.starts_with("Package Id") {
|
if dotnet_help_output.to_string().contains("tool") {
|
||||||
return Err(SkipStep(String::from("dotnet did not output packages")).into());
|
let output = Command::new(dotnet)
|
||||||
|
.args(["tool", "list", "--global"])
|
||||||
|
.output_checked_utf8()?;
|
||||||
|
|
||||||
|
if !output.stdout.starts_with("Package Id") {
|
||||||
|
return Err(SkipStep(String::from("dotnet did not output packages")).into());
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut packages = output.stdout.lines().skip(2).filter(|line| !line.is_empty()).peekable();
|
||||||
|
|
||||||
|
if packages.peek().is_none() {
|
||||||
|
return Err(SkipStep(String::from("No dotnet global tools installed")).into());
|
||||||
|
}
|
||||||
|
|
||||||
|
print_separator(".NET");
|
||||||
|
|
||||||
|
for package in packages {
|
||||||
|
let package_name = package.split_whitespace().next().unwrap();
|
||||||
|
ctx.run_type()
|
||||||
|
.execute("dotnet")
|
||||||
|
.args(["tool", "update", package_name, "--global"])
|
||||||
|
.status_checked()
|
||||||
|
.with_context(|| format!("Failed to update .NET package {package_name}"))?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
let mut packages = output.stdout.lines().skip(2).filter(|line| !line.is_empty()).peekable();
|
pub fn run_helix_grammars(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
utils::require("helix")?;
|
||||||
|
|
||||||
if packages.peek().is_none() {
|
print_separator("Helix");
|
||||||
return Err(SkipStep(String::from("No dotnet global tools installed")).into());
|
|
||||||
}
|
|
||||||
|
|
||||||
print_separator(".NET");
|
ctx.run_type()
|
||||||
|
.execute(ctx.sudo().as_ref().ok_or(TopgradeError::SudoRequired)?)
|
||||||
|
.args(["helix", "--grammar", "fetch"])
|
||||||
|
.status_checked()
|
||||||
|
.with_context(|| "Failed to download helix grammars!")?;
|
||||||
|
|
||||||
for package in packages {
|
ctx.run_type()
|
||||||
let package_name = package.split_whitespace().next().unwrap();
|
.execute(ctx.sudo().as_ref().ok_or(TopgradeError::SudoRequired)?)
|
||||||
ctx.run_type()
|
.args(["helix", "--grammar", "build"])
|
||||||
.execute("dotnet")
|
.status_checked()
|
||||||
.args(["tool", "update", package_name, "--global"])
|
.with_context(|| "Failed to build helix grammars!")?;
|
||||||
.status_checked()
|
|
||||||
.with_context(|| format!("Failed to update .NET package {package_name}"))?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -554,3 +586,10 @@ pub fn update_julia_packages(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
.args(["-e", "using Pkg; Pkg.update()"])
|
.args(["-e", "using Pkg; Pkg.update()"])
|
||||||
.status_checked()
|
.status_checked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_helm_repo_update(run_type: RunType) -> Result<()> {
|
||||||
|
let helm = utils::require("helm")?;
|
||||||
|
|
||||||
|
print_separator("Helm");
|
||||||
|
run_type.execute(helm).arg("repo").arg("update").status_checked()
|
||||||
|
}
|
||||||
|
|||||||
@@ -102,6 +102,12 @@ pub fn run_fisher(run_type: RunType) -> Result<()> {
|
|||||||
.and_then(|output| Path::new(&output.stdout.trim()).require().map(|_| ()))
|
.and_then(|output| Path::new(&output.stdout.trim()).require().map(|_| ()))
|
||||||
.map_err(|err| SkipStep(format!("`fish_plugins` path doesn't exist: {err}")))?;
|
.map_err(|err| SkipStep(format!("`fish_plugins` path doesn't exist: {err}")))?;
|
||||||
|
|
||||||
|
Command::new(&fish)
|
||||||
|
.args(["-c", "fish_update_completions"])
|
||||||
|
.output_checked_utf8()
|
||||||
|
.map(|_| ())
|
||||||
|
.map_err(|_| SkipStep("`fish_update_completions` is not available".to_owned()))?;
|
||||||
|
|
||||||
print_separator("Fisher");
|
print_separator("Fisher");
|
||||||
|
|
||||||
let version_str = run_type
|
let version_str = run_type
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ use which_crate::which;
|
|||||||
use crate::command::CommandExt;
|
use crate::command::CommandExt;
|
||||||
use crate::report::StepResult;
|
use crate::report::StepResult;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
use crate::terminal;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
use crate::utils::which;
|
use crate::utils::which;
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref TERMINAL: Mutex<Terminal> = Mutex::new(Terminal::new());
|
static ref TERMINAL: Mutex<Terminal> = Mutex::new(Terminal::new());
|
||||||
}
|
}
|
||||||
@@ -105,7 +106,7 @@ impl Terminal {
|
|||||||
command.args(["-a", "Topgrade", "Topgrade"]);
|
command.args(["-a", "Topgrade", "Topgrade"]);
|
||||||
command.arg(message.as_ref());
|
command.arg(message.as_ref());
|
||||||
if let Err(err) = command.output_checked() {
|
if let Err(err) = command.output_checked() {
|
||||||
tracing::error!("{err:?}");
|
terminal::print_warning("Senfing notification failed with {err:?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user