Skip to content

Commit 9dc557a

Browse files
committed
Merge branch 'develop'
2 parents 30a448a + 5b15baa commit 9dc557a

File tree

18 files changed

+592
-579
lines changed

18 files changed

+592
-579
lines changed

Cargo.lock

Lines changed: 96 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git-repo-manager"
3-
version = "0.7.21"
3+
version = "0.7.22"
44
edition = "2021"
55

66
authors = [
@@ -46,7 +46,7 @@ path = "src/grm/main.rs"
4646
version = "=0.8.19"
4747

4848
[dependencies.serde]
49-
version = "=1.0.214"
49+
version = "=1.0.215"
5050
features = ["derive"]
5151

5252
[dependencies.git2]
@@ -56,7 +56,7 @@ version = "=0.19.0"
5656
version = "=3.1.0"
5757

5858
[dependencies.clap]
59-
version = "=4.5.20"
59+
version = "=4.5.21"
6060
features = ["derive", "cargo"]
6161

6262
[dependencies.console]
@@ -66,16 +66,16 @@ version = "=0.15.8"
6666
version = "=1.11.1"
6767

6868
[dependencies.comfy-table]
69-
version = "=7.1.1"
69+
version = "=7.1.3"
7070

7171
[dependencies.serde_yaml]
7272
version = "=0.9.34"
7373

7474
[dependencies.serde_json]
75-
version = "=1.0.132"
75+
version = "=1.0.133"
7676

7777
[dependencies.ureq]
78-
version = "=2.10.1"
78+
version = "=2.11.0"
7979
features = ["json"]
8080

8181
[dependencies.parse_link_header]

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
if let Ok(v) = std::env::var("GRM_RELEASE_VERSION") {
3-
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", v);
3+
println!("cargo:rustc-env=CARGO_PKG_VERSION={v}");
44
}
55
println!("cargo:rerun-if-env-changed=GRM_RELEASE_VERSION");
66
}

pkg/arch/.SRCINFO

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pkgbase = grm-git
22
pkgdesc = Manage git repos, worktrees and integrate with GitHub and GitLab
3-
pkgver = 0.7.15.r6.gea7299a
4-
pkgrel = 2
3+
pkgver = 0.7.21.r1.gfcd315b
4+
pkgrel = 1
55
url = https://github.com/hakoerber/git-repo-manager
66
arch = x86_64
77
license = GPL-3.0-only
@@ -14,6 +14,8 @@ pkgbase = grm-git
1414
depends = openssl
1515
provides = grm
1616
conflicts = grm
17+
options = !lto
18+
options = !debug
1719
source = grm-git::git+https://github.com/hakoerber/git-repo-manager#branch=develop
1820
sha256sums = SKIP
1921

pkg/arch/PKGBUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Hannes Körber <hannes@hkoerber.de>
22
pkgname='grm-git'
3-
pkgver=0.7.15.r6.gea7299a
4-
pkgrel=2
3+
pkgver=0.7.21.r1.gfcd315b
4+
pkgrel=1
55
pkgdesc='Manage git repos, worktrees and integrate with GitHub and GitLab'
66
arch=('x86_64')
77
url='https://github.com/hakoerber/git-repo-manager'
@@ -12,6 +12,8 @@ provides=('grm')
1212
conflicts=('grm')
1313
source=("${pkgname}::git+https://github.com/hakoerber/git-repo-manager#branch=develop")
1414
sha256sums=('SKIP')
15+
# https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/issues/20
16+
options=(!lto !debug)
1517

1618
pkgver() {
1719
cd "${pkgname}"
@@ -29,8 +31,6 @@ build() {
2931
export RUSTUP_TOOLCHAIN=stable
3032
export CARGO_TARGET_DIR=target
3133
export GRM_RELEASE_VERSION="${pkgver}"
32-
# https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/issues/20
33-
export CFLAGS+=' -ffat-lto-objects'
3434
cargo build --frozen --release
3535
}
3636

src/auth.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ pub fn get_token_from_command(command: &str) -> Result<AuthToken, String> {
1515
.arg("-c")
1616
.arg(command)
1717
.output()
18-
.map_err(|error| format!("Failed to run token-command: {}", error))?;
18+
.map_err(|error| format!("Failed to run token-command: {error}"))?;
1919

2020
let stderr = String::from_utf8(output.stderr).map_err(|error| error.to_string())?;
2121
let stdout = String::from_utf8(output.stdout).map_err(|error| error.to_string())?;
2222

2323
if !output.status.success() {
24-
if !stderr.is_empty() {
25-
return Err(format!("Token command failed: {}", stderr));
24+
return if !stderr.is_empty() {
25+
Err(format!("Token command failed: {stderr}"))
2626
} else {
27-
return Err(String::from("Token command failed."));
28-
}
27+
Err(String::from("Token command failed."))
28+
};
2929
}
3030

3131
if !stderr.is_empty() {
32-
return Err(format!("Token command produced stderr: {}", stderr));
32+
return Err(format!("Token command produced stderr: {stderr}"));
3333
}
3434

3535
if stdout.is_empty() {

src/config.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ impl ConfigTrees {
134134
}
135135

136136
pub fn from_vec(vec: Vec<ConfigTree>) -> Self {
137-
ConfigTrees { trees: vec }
137+
Self { trees: vec }
138138
}
139139

140140
pub fn from_trees(vec: Vec<tree::Tree>) -> Self {
141-
ConfigTrees {
141+
Self {
142142
trees: vec.into_iter().map(ConfigTree::from_tree).collect(),
143143
}
144144
}
@@ -159,12 +159,12 @@ impl ConfigTrees {
159159
impl Config {
160160
pub fn trees(self) -> Result<Vec<ConfigTree>, String> {
161161
match self {
162-
Config::ConfigTrees(config) => Ok(config.trees),
163-
Config::ConfigProvider(config) => {
162+
Self::ConfigTrees(config) => Ok(config.trees),
163+
Self::ConfigProvider(config) => {
164164
let token = match auth::get_token_from_command(&config.token_command) {
165165
Ok(token) => token,
166166
Err(error) => {
167-
print_error(&format!("Getting token from command failed: {}", error));
167+
print_error(&format!("Getting token from command failed: {error}"));
168168
process::exit(1);
169169
}
170170
};
@@ -194,7 +194,7 @@ impl Config {
194194
match provider::Github::new(filter, token, config.api_url) {
195195
Ok(provider) => provider,
196196
Err(error) => {
197-
print_error(&format!("Error: {}", error));
197+
print_error(&format!("Error: {error}"));
198198
process::exit(1);
199199
}
200200
}
@@ -208,7 +208,7 @@ impl Config {
208208
match provider::Gitlab::new(filter, token, config.api_url) {
209209
Ok(provider) => provider,
210210
Err(error) => {
211-
print_error(&format!("Error: {}", error));
211+
print_error(&format!("Error: {error}"));
212212
process::exit(1);
213213
}
214214
}
@@ -243,11 +243,11 @@ impl Config {
243243
}
244244

245245
pub fn from_trees(trees: Vec<ConfigTree>) -> Self {
246-
Config::ConfigTrees(ConfigTrees { trees })
246+
Self::ConfigTrees(ConfigTrees { trees })
247247
}
248248

249249
pub fn normalize(&mut self) {
250-
if let Config::ConfigTrees(config) = self {
250+
if let Self::ConfigTrees(config) = self {
251251
let home = path::env_home();
252252
for tree in &mut config.trees_mut().iter_mut() {
253253
if tree.root.starts_with(&home) {
@@ -310,8 +310,7 @@ where
310310
Ok(s) => s,
311311
Err(e) => {
312312
return Err(format!(
313-
"Error reading configuration file \"{}\": {}",
314-
path,
313+
"Error reading configuration file \"{path}\": {}",
315314
match e.kind() {
316315
std::io::ErrorKind::NotFound => String::from("not found"),
317316
_ => e.to_string(),
@@ -324,12 +323,7 @@ where
324323
Ok(c) => c,
325324
Err(_) => match serde_yaml::from_str(&content) {
326325
Ok(c) => c,
327-
Err(e) => {
328-
return Err(format!(
329-
"Error parsing configuration file \"{}\": {}",
330-
path, e
331-
))
332-
}
326+
Err(e) => return Err(format!("Error parsing configuration file \"{path}\": {e}",)),
333327
},
334328
};
335329

0 commit comments

Comments
 (0)