Compare commits

..

3 Commits

Author SHA1 Message Date
Thomas Schönauer
e161d3cd3c 10.1.2 (#162)
* Closes #150 please disable distrobox by default (#151)

* Check if distrobox exists before running step

* Improve help prompt value names (#153)

* 159 self update error message with standalone versions (#161)

* Rename back to topgrade

* Bugfix Version bump

* Changes reference to topgrade-rs in self-update

* Fixes distrobox errors (#160)

* Rename back to topgrade

* Bugfix Version bump

* Check if distrobox exists before running step

* Fixed sitrobox and version bump

* Version bump to 10.1.2

Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
2022-11-06 13:54:38 +00:00
Marcin Puc
318f935b43 Add info about Void Linux to README (#154) 2022-11-05 14:43:09 +00:00
Thomas Schönauer
3dc245245d bugfix Closing #150 (#151) (#152)
Closes #150 please disable distrobox by default (#151)

* Check if distrobox exists before running step
2022-11-05 10:50:55 +00:00
6 changed files with 23 additions and 16 deletions

2
Cargo.lock generated
View File

@@ -1946,7 +1946,7 @@ dependencies = [
[[package]]
name = "topgrade"
version = "10.1.0"
version = "10.1.2"
dependencies = [
"anyhow",
"cfg-if",

View File

@@ -5,7 +5,7 @@ categories = ["os"]
keywords = ["upgrade", "update"]
license-file = "LICENSE"
repository = "https://github.com/topgrade-rs/topgrade"
version = "10.1.0"
version = "10.1.2"
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
exclude = ["doc/screenshot.gif"]
edition = "2021"

View File

@@ -24,6 +24,7 @@ To remedy this, **Topgrade** detects which tools you use and runs the appropriat
- Arch Linux: [AUR](https://aur.archlinux.org/packages/topgrade) package.
- NixOS: _topgrade_ package in `nixpkgs`.
- Void Linux: _topgrade_ package
- macOS: [Homebrew](https://formulae.brew.sh/formula/topgrade) or [MacPorts](https://ports.macports.org/port/topgrade/).
Other systems users can either use `cargo install` or use the compiled binaries from the release page.

View File

@@ -424,19 +424,19 @@ pub struct CommandLineArgs {
no_retry: bool,
/// Do not perform upgrades for the given steps
#[clap(long = "disable", arg_enum, multiple_values = true)]
#[clap(long = "disable", value_name = "STEP", arg_enum, multiple_values = true)]
disable: Vec<Step>,
/// Perform only the specified steps (experimental)
#[clap(long = "only", arg_enum, multiple_values = true)]
#[clap(long = "only", value_name = "STEP", arg_enum, multiple_values = true)]
only: Vec<Step>,
/// Run only specific custom commands
#[clap(long = "custom-commands")]
#[clap(long = "custom-commands", value_name = "NAME", multiple_values = true)]
custom_commands: Vec<String>,
/// Set environment variables
#[clap(long = "env", multiple_values = true)]
#[clap(long = "env", value_name = "NAME=VALUE", multiple_values = true)]
env: Vec<String>,
/// Output logs
@@ -452,7 +452,14 @@ pub struct CommandLineArgs {
skip_notify: bool,
/// Say yes to package manager's prompt
#[clap(short = 'y', long = "yes", arg_enum, multiple_values = true, min_values = 0)]
#[clap(
short = 'y',
long = "yes",
value_name = "STEP",
arg_enum,
multiple_values = true,
min_values = 0
)]
yes: Option<Vec<Step>>,
/// Don't pull the predefined git repos
@@ -460,11 +467,11 @@ pub struct CommandLineArgs {
disable_predefined_git_repos: bool,
/// Alternative configuration file
#[clap(long = "config")]
#[clap(long = "config", value_name = "PATH")]
config: Option<PathBuf>,
/// A regular expression for restricting remote host execution
#[clap(long = "remote-host-limit")]
#[clap(long = "remote-host-limit", value_name = "REGEX")]
remote_host_limit: Option<Regex>,
/// Show the reason for skipped steps

View File

@@ -18,11 +18,7 @@ pub fn self_update() -> Result<()> {
.repo_owner("topgrade-rs")
.repo_name("topgrade")
.target(target)
.bin_name(if cfg!(windows) {
"topgrade-rs.exe"
} else {
"topgrade-rs"
})
.bin_name(if cfg!(windows) { "topgrade.exe" } else { "topgrade" })
.show_output(false)
.show_download_progress(true)
.current_version(self_update_crate::cargo_crate_version!())

View File

@@ -607,10 +607,12 @@ pub fn run_protonup_update(ctx: &ExecutionContext) -> Result<()> {
}
pub fn run_distrobox_update(ctx: &ExecutionContext) -> Result<()> {
let distrobox = require("distrobox")?;
print_separator("Distrobox");
match (
match (
ctx.run_type().execute("distrobox").arg("upgrade"),
ctx.run_type().execute(distrobox).arg("upgrade"),
ctx.config().distrobox_containers(),
) {
(r, Some(c)) => {
@@ -626,7 +628,8 @@ pub fn run_distrobox_update(ctx: &ExecutionContext) -> Result<()> {
(r, true) => r.arg("--root"),
(r, false) => r,
}
.check_run()
.check_run()?;
Ok(())
}
pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {