generated from PlexSheep/rs-base
Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Christoph J. Scherr | 72456d5297 | |
Christoph J. Scherr | 0617cbb11b | |
Christoph J. Scherr | 44c7a110e3 | |
Christoph J. Scherr | e5c5d94c22 | |
Christoph J. Scherr | 07f23b7e7b | |
Christoph J. Scherr | f9c164b21f | |
Christoph J. Scherr | f4d7d6bc72 | |
Christoph J. Scherr | ee1b849c1b |
|
@ -1,46 +0,0 @@
|
||||||
name: cargo devel CI
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '**'
|
|
||||||
# - '!master'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
format:
|
|
||||||
name: cargo CI
|
|
||||||
permissions:
|
|
||||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
|
||||||
# added or changed files to the repository.
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: get repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: install rust
|
|
||||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
|
||||||
- name: install additional rust things
|
|
||||||
run: |
|
|
||||||
rustup component add rustfmt
|
|
||||||
rustup component add clippy
|
|
||||||
- name: config custom registry
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.cargo/
|
|
||||||
echo "" > ~/.cargo/config.toml
|
|
||||||
echo "[registry]" >> ~/.cargo/config.toml
|
|
||||||
echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml
|
|
||||||
echo '[registries.cscherr]' >> ~/.cargo/config.toml
|
|
||||||
echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml
|
|
||||||
cat ~/.cargo/config.toml
|
|
||||||
- name: cargo clippy check
|
|
||||||
run: cargo clippy --all-features --all-targets --workspace
|
|
||||||
- name: cargo clippy fix
|
|
||||||
run: cargo clippy --fix --all-features --all-targets --workspace
|
|
||||||
- name: cargo fmt
|
|
||||||
run: cargo fmt --all
|
|
||||||
- name: cargo test
|
|
||||||
run: cargo test --all-features --all-targets --workspace
|
|
||||||
- name: commit back to repository
|
|
||||||
uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
|
||||||
with:
|
|
||||||
# Optional. Commit message for the created commit.
|
|
||||||
# Defaults to "Apply automatic changes"
|
|
||||||
commit_message: automatic cargo CI changes
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
# Check for updates every Monday
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
|
@ -1,10 +1,16 @@
|
||||||
name: cargo devel CI
|
name: Rust CI
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
# - '!master'
|
# - '!master'
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CI:
|
CI:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -44,4 +50,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
# Optional. Commit message for the created commit.
|
# Optional. Commit message for the created commit.
|
||||||
# Defaults to "Apply automatic changes"
|
# Defaults to "Apply automatic changes"
|
||||||
commit_message: automatic cargo CI changes
|
commit_message: "ci: automatic Rust CI changes"
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
name: Release-plz
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Release unpublished packages.
|
||||||
|
release-plz-release:
|
||||||
|
name: Release-plz release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Run release-plz
|
||||||
|
uses: MarcoIeni/release-plz-action@v0.5
|
||||||
|
with:
|
||||||
|
command: release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
# Create a PR with the new versions and changelog, preparing the next release.
|
||||||
|
release-plz-pr:
|
||||||
|
name: Release-plz PR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency:
|
||||||
|
group: release-plz-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Run release-plz
|
||||||
|
uses: MarcoIeni/release-plz-action@v0.5
|
||||||
|
with:
|
||||||
|
command: release-pr
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hedu"
|
name = "hedu"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = true
|
publish = true
|
||||||
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
||||||
|
@ -12,6 +12,9 @@ repository = "https://git.cscherr.de/PlexSheep/hedu"
|
||||||
keywords = ["hexdumper"]
|
keywords = ["hexdumper"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libpt = { version = "0.5.1", features = ["bintols", "log"], default-features = false }
|
libpt = { version = "0.5.1", features = [
|
||||||
|
"bintols",
|
||||||
|
"log",
|
||||||
|
], default-features = false }
|
||||||
clap = { version = "4.4.4", features = ["derive", "help"] }
|
clap = { version = "4.4.4", features = ["derive", "help"] }
|
||||||
anyhow = "1.0.79"
|
anyhow = "1.0.79"
|
||||||
|
|
11
README.md
11
README.md
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
![Project badge](https://img.shields.io/badge/language-Rust-blue.svg)
|
![Project badge](https://img.shields.io/badge/language-Rust-blue.svg)
|
||||||
![Crates.io License](https://img.shields.io/crates/l/hedu)
|
![Crates.io License](https://img.shields.io/crates/l/hedu)
|
||||||
![Gitea Release](https://img.shields.io/gitea/v/release/PlexSheep/hedu?gitea_url=https%3A%2F%2Fgit.cscherr.de)
|
![GitHub Release](https://img.shields.io/github/v/release/PlexSheep/hedu)
|
||||||
![Gitea language count](https://img.shields.io/gitea/languages/count/PlexSheep/hedu?gitea_url=https%3A%2F%2Fgit.cscherr.de)
|
![GitHub language count](https://img.shields.io/github/languages/count/PlexSheep/hedu)
|
||||||
[![cargo checks and tests](https://github.com/PlexSheep/hedu/actions/workflows/cargo.yaml/badge.svg)](https://github.com/PlexSheep/hedu/actions/workflows/cargo.yaml)
|
[![Rust CI](https://github.com/PlexSheep/hedu/actions/workflows/cargo.yaml/badge.svg)](https://github.com/PlexSheep/hedu/actions/workflows/cargo.yaml)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hex dumping tool written in Rust.
|
Hex dumping tool written in Rust.
|
||||||
|
|
||||||
* [Original Repository](https://git.cscherr.de/PlexSheep/hedu)
|
* [GitHub](https://github.com/PlexSheep/hedu)
|
||||||
* [GitHub Mirror](https://github.com/PlexSheep/hedu)
|
|
||||||
* [crates.io](https://crates.io/crates/hedu)
|
* [crates.io](https://crates.io/crates/hedu)
|
||||||
* [docs.rs](https://docs.rs/crate/hedu/)
|
* [docs.rs](https://docs.rs/crate/hedu/)
|
||||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -99,13 +99,10 @@ fn main() {
|
||||||
let mut config = Hedu::new(cli.chars, cli.skip, cli.show_identical, cli.limit);
|
let mut config = Hedu::new(cli.chars, cli.skip, cli.show_identical, cli.limit);
|
||||||
// FIXME: find a better way to get the file name
|
// FIXME: find a better way to get the file name
|
||||||
// Currently, skipped sources make an extra newline here.
|
// Currently, skipped sources make an extra newline here.
|
||||||
match config.chars {
|
if config.chars {
|
||||||
false => {
|
println!("{:─^80}", format!(" {} ", cli.data_source[i]));
|
||||||
println!("{:─^59}", format!(" {} ", cli.data_source[i]));
|
} else {
|
||||||
}
|
println!("{:─^59}", format!(" {} ", cli.data_source[i]));
|
||||||
true => {
|
|
||||||
println!("{:─^80}", format!(" {} ", cli.data_source[i]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
match config.dump(&mut **source) {
|
match config.dump(&mut **source) {
|
||||||
Ok(()) => (),
|
Ok(()) => (),
|
||||||
|
|
Reference in New Issue