Skip to content

Commit 6cbc70a

Browse files
committed
handle provides and automate dynamic appimage conversion
1 parent 3a25567 commit 6cbc70a

File tree

11 files changed

+457
-246
lines changed

11 files changed

+457
-246
lines changed

Cargo.lock

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

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ Usage: sbuild [OPTIONS] [FILES]
3333
A builder for SBUILD package files.
3434

3535
Options:
36-
--help, -h Show this help message
37-
--debug, -d Execute build scripts in debug mode
38-
--outdir, -o <PATH> Directory to store the build files in
39-
--timeout <DURATION> Timeout duration after which the pkgver check exits
36+
--help, -h Show this help message
37+
--log-level Log level for build script: info/1 (default), verbose/2, debug/3
38+
--keep, -k Whether to keep sbuild temp directory
39+
--outdir, -o <PATH> Directory to store the build files in
40+
--timeout-linter <DURATION> Timeout duration after which the linter exists
4041

4142
Arguments:
4243
FILE... One or more package files to build

sbuild-linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "sbuild-linter"
33
description = "Linter for SBUILD package files"
4-
version = "0.4.0"
4+
version = "0.4.1"
55
authors.workspace = true
66
license.workspace = true
77
edition.workspace = true

sbuild-linter/src/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use std::{
22
collections::HashSet,
3+
env,
34
fmt::Display,
45
fs::{File, Permissions},
56
io::{BufRead, BufReader, BufWriter, Write},
67
os::unix::fs::PermissionsExt,
8+
path::Path,
79
process::{Command, ExitStatus},
810
sync, thread,
911
time::Duration,
@@ -76,7 +78,14 @@ impl Linter {
7678
}
7779
};
7880

79-
logger.info(&format!("Linting {}", file_path));
81+
let path = Path::new(&file_path);
82+
let real_path = if path.is_absolute() {
83+
path
84+
} else {
85+
let current_dir = env::current_dir().expect("Failed to get current directory");
86+
&current_dir.join(path)
87+
};
88+
logger.info(format!("Linting {} ({})\n", file_path, real_path.display()));
8089
match self.deserialize_yaml(&yaml_str) {
8190
Ok(config) => {
8291
if disable_shellcheck {

sbuild-linter/src/logger.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,17 @@ impl TaskLogger {
7676
let seconds = total_seconds % 60;
7777
let milliseconds = (elapsed.subsec_millis()) as u64;
7878

79-
let timestamp = format!("[{:02}:{:02}.{:03}]", minutes, seconds, milliseconds);
80-
81-
let msg = format!("{} {}", timestamp, msg);
82-
let _ = writeln!(file_guard.file, "{}", msg);
79+
let msg = format!("{}\n", msg);
80+
for line in msg.lines() {
81+
let timestamp = format!("[{:02}:{:02}.{:03}]", minutes, seconds, milliseconds);
82+
83+
let line = if line.is_empty() {
84+
format!("{}", timestamp)
85+
} else {
86+
format!("{}➜ {}", timestamp, line)
87+
};
88+
let _ = writeln!(file_guard.file, "{}", line);
89+
}
8390
}
8491
}
8592
}

sbuild/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sbuild"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors.workspace = true
55
license.workspace = true
66
edition.workspace = true
@@ -17,11 +17,11 @@ goblin = { version = "0.9.2", features = ["elf64", "elf32", "endian_fd", "std"]
1717
indexmap = "2.6.0"
1818
memmap2 = "0.9.5"
1919
reqwest = { version = "0.12.9", features = ["blocking", "http2", "rustls-tls", "stream"], default-features = false }
20-
sbuild-linter = { version = "0.4.0", path = "../sbuild-linter" }
20+
sbuild-linter = { version = "0.4.1", path = "../sbuild-linter" }
2121
serde = { version = "1.0.215", features = ["derive"] }
2222
serde_json = { version = "1.0.133", features = ["indexmap"] }
2323
serde_yml = "0.0.12"
24-
squishy = { version = "0.3.0", features = ["appimage", "rayon"] }
24+
squishy = { version = "0.3.1", features = ["appimage"] }
2525
tempfile = "3.15.0"
2626
tokio = { version = "1.41.1", features = ["macros", "rt-multi-thread"] }
2727
which = "7.0.0"

0 commit comments

Comments
 (0)