Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/cd-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Continuous delivery - test

on:
pull_request:
# opened, reopenened, synchronize are the default types for pull_request
# labeled, unlabeled ensure this check is also run if a label is added or removed
types: [opened, reopened, synchronize, labeled, unlabeled]

jobs:
test-publish:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-publish-check') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: cargo publish --dry-run
19 changes: 19 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous delivery - crates.io

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment: crates.io
permissions:
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: Check library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Check library
run: |
cargo check --all-targets
cargo check --all-features --all-targets

build-no-std:
name: Check library (no-std)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Check library (no-std)
run: |
cargo check
cargo check --all-features

test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run tests
run: cargo test
- name: Run tests with all features
run: cargo test --all-features

clippy:
name: Run clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: "clippy"
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings

fmt:
name: Run rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: "rustfmt"
- name: Run rustfmt
run: cargo fmt -- --check
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

[Unreleased]: https://github.com/trussed-dev/admin-app/compare/0.2.0...HEAD

-

## [0.2.0] 2026-07-22

[0.2.0]: https://github.com/trussed-dev/admin-app/compare/0.1.0...0.2.0

- Update to trussed v0.2.
- Introduce ADMIN vendor command as a namespace for all other commands.
- Add factory reset command.
- Add config commands.
- Add status command.
- Add test-se050 command.

## [0.1.0] - 2022-03-17

[0.1.0]: https://github.com/trussed-dev/admin-app/releases/tag/0.1.0

Initial release.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "admin-app"
version = "0.1.0"
version = "0.2.0"
authors = ["Conor Patrick <conor@solokeys.com>", "Nicolas Stalder <nicolas@solokeys.com>"]
repository = "https://github.com/solokeys/admin-app"
edition = "2021"
Expand All @@ -15,11 +15,11 @@ delog = "0.1"
heapless = "0.9"
heapless-bytes = { version = "0.5", features = ["heapless-0.9"] }
iso7816 = "0.2"
littlefs2 = { version = "0.7", optional = true }
littlefs2 = { version = "0.8", optional = true }
littlefs2-core = { version = "0.1", features = ["heapless-bytes05"] }
serde = { version = "1.0.180", default-features = false }
strum_macros = "0.25.2"
trussed = { version = "=0.2.0-rc.1", default-features = false }
trussed = { version = "0.2", default-features = false }
trussed-core = { version = "0.2", features = ["crypto-client", "filesystem-client", "management-client", "ui-client"] }

embedded-hal = { version = "0.2.7", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ impl<'a> ConfigValueMut<'a> {
impl<'a> Display for ConfigValueMut<'a> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::Bool(value) => write!(f, "{}", value),
Self::U8(value) => write!(f, "{}", value),
Self::Bool(value) => write!(f, "{value}"),
Self::U8(value) => write!(f, "{value}"),
}
}
}
Expand Down Expand Up @@ -281,7 +281,7 @@ pub fn get<C: Config>(
response: &mut VecView<u8>,
) -> Result<(), ConfigError> {
let field = config.field(key).ok_or(ConfigError::InvalidKey)?;
write!(response, "{}", field).map_err(|_| ConfigError::DataTooLong)
write!(response, "{field}").map_err(|_| ConfigError::DataTooLong)
}

pub fn set<C: Config>(config: &mut C, key: &str, value: &str) -> Result<(), ConfigError> {
Expand Down
2 changes: 0 additions & 2 deletions src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ pub mod test_utils {
block_size = 512,
block_count = 128,
lookahead_size_ty = littlefs2::consts::U8,
filename_max_plus_one_ty = littlefs2::consts::U256,
path_max_plus_one_ty = littlefs2::consts::U256,
);

pub fn test_migration_one(
Expand Down
Loading