generated from PlexSheep/baserepo
Compare commits
21 commits
16119a7943
...
6d5171357b
Author | SHA1 | Date | |
---|---|---|---|
6d5171357b | |||
714db3a9e6 | |||
4b7d08ae37 | |||
d6cd2913d3 | |||
54eac92ca7 | |||
e0bc9cba0b | |||
d1e888c138 | |||
9f27db1ce3 | |||
d792d88ff6 | |||
b3013caacc | |||
1afaf6d3d2 | |||
b7ba762703 | |||
004550ba9c | |||
60765cfbf9 | |||
8c1666af8f | |||
4087752ab9 | |||
686eff5a63 | |||
af37c36ed2 | |||
426f17bd4f | |||
af93542c86 | |||
3f3da0e209 |
4 changed files with 22 additions and 26 deletions
16
Cargo.toml
16
Cargo.toml
|
@ -10,14 +10,14 @@ members = [
|
|||
default-members = [".", "members/libpt-core"]
|
||||
[workspace.package]
|
||||
publish = true
|
||||
version = "0.3.3"
|
||||
version = "0.3.10-alpha.1"
|
||||
edition = "2021"
|
||||
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
||||
license = "MIT"
|
||||
description = "Personal multitool"
|
||||
readme = "README.md"
|
||||
homepage = "https://git.cscherr.de/PlexSheep/libpt"
|
||||
repository = "https://git.cscherr.de/PlexSheep/libpt"
|
||||
homepage = "https://git.cscherr.de/PlexSheep/pt"
|
||||
repository = "https://git.cscherr.de/PlexSheep/pt"
|
||||
keywords = ["cli", "library"]
|
||||
categories = [
|
||||
"command-line-utilities",
|
||||
|
@ -28,11 +28,11 @@ categories = [
|
|||
[workspace.dependencies]
|
||||
anyhow = "1.0.79"
|
||||
thiserror = "1.0.56"
|
||||
libpt-core = { version = "0.3.3", path = "members/libpt-core", registry = "cscherr" }
|
||||
libpt-bintols = { version = "0.3.3", path = "members/libpt-bintols", registry = "cscherr" }
|
||||
libpt-log = { version = "0.3.3", path = "members/libpt-log", registry = "cscherr" }
|
||||
libpt-math = { version = "0.3.3", path = "members/libpt-math", registry = "cscherr" }
|
||||
libpt-net = { version = "0.3.3", path = "members/libpt-net", registry = "cscherr" }
|
||||
libpt-core = { version = "0.3.10-alpha.1", path = "members/libpt-core", registry = "cscherr" }
|
||||
libpt-bintols = { version = "0.3.10-alpha.1", path = "members/libpt-bintols", registry = "cscherr" }
|
||||
libpt-log = { version = "0.3.10-alpha.1", path = "members/libpt-log", registry = "cscherr" }
|
||||
libpt-math = { version = "0.3.10-alpha.1", path = "members/libpt-math", registry = "cscherr" }
|
||||
libpt-net = { version = "0.3.10-alpha.1", path = "members/libpt-net", registry = "cscherr" }
|
||||
|
||||
[package]
|
||||
name = "libpt"
|
||||
|
|
|
@ -69,6 +69,7 @@ pub fn dump(data: &mut dyn DataSource, mut config: HeduConfig) -> Result<()> {
|
|||
if config.skip > 0 {
|
||||
data.skip(config.skip)?;
|
||||
config.data_idx += config.skip;
|
||||
config.data_idx += BYTES_PER_LINE - config.data_idx % BYTES_PER_LINE;
|
||||
debug!("Skipped {}", humanbytes(config.skip));
|
||||
}
|
||||
|
||||
|
@ -158,19 +159,14 @@ fn mask_chars(c: char) -> char {
|
|||
}
|
||||
|
||||
fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> {
|
||||
config.rd_counter += config.len;
|
||||
config.data_idx += config.len;
|
||||
match data.read(&mut config.buf[config.alt_buf]) {
|
||||
Ok(mut len) => {
|
||||
debug!(
|
||||
trace!(
|
||||
conf = format!("{:?}", config),
|
||||
dif = (config.rd_counter as i64 - config.skip as i64),
|
||||
eval = (config.rd_counter as i64 - config.skip as i64) as usize >= config.limit,
|
||||
eval = config.limit != 0 && config.rd_counter >= config.limit,
|
||||
"reached limit?"
|
||||
);
|
||||
if config.limit != 0
|
||||
&& (config.rd_counter as i64 - config.skip as i64) as usize >= config.limit
|
||||
{
|
||||
if config.limit != 0 && config.rd_counter + (BYTES_PER_LINE - 1) >= config.limit {
|
||||
trace!(
|
||||
conf = format!("{:?}", config),
|
||||
nlen = (config.limit % BYTES_PER_LINE),
|
||||
|
@ -180,6 +176,8 @@ fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> {
|
|||
config.stop = true;
|
||||
}
|
||||
config.len = len;
|
||||
config.rd_counter += config.len;
|
||||
config.data_idx += config.len;
|
||||
return Ok(());
|
||||
}
|
||||
Err(err) => {
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
PKGs=(libpt-{core,math,log,net,bintols,ccc,hedu,bin,py} libpt)
|
||||
for PKG in "${PKGs[@]}"; do
|
||||
echo "Package: $PKG"
|
||||
cargo publish --registry cscherr -p "$PKG"
|
||||
cargo publish -p "$PKG"
|
||||
done
|
|
@ -1,4 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
cargo ws publish --registry cscherr
|
||||
cargo publish --registry cscherr -p libpt
|
||||
cargo check --all-features
|
||||
cargo ws version --no-git-commit
|
||||
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
|
||||
bash scripts/set_all_versions.sh $NEW_VERSION
|
||||
git add -A
|
||||
git commit -m "Release v$NEW_VERSION"
|
||||
cargo ws publish --registry cscherr --amend --publish-as-is || cargo publish --registry cscherr -p libpt
|
||||
git push
|
||||
|
|
Reference in a new issue