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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
- name: Run Tests
run: cargo +stable test --locked

- name: Check CLI Version
shell: bash
run: |
expected="why $(cargo +stable metadata --locked --no-deps --format-version 1 | python3 -c 'import json, sys; print(json.load(sys.stdin)["packages"][0]["version"])')"
actual="$(cargo +stable run --locked -- --version)"
test "$actual" = "$expected"

e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ jobs:
with:
save-if: "false"

- name: Verify Release Version
shell: bash
run: |
crate_version="$(cargo +stable metadata --locked --no-deps --format-version 1 | python3 -c 'import json, sys; print(json.load(sys.stdin)["packages"][0]["version"])')"
tag_version="${GITHUB_REF_NAME#v}"
if [ "$crate_version" != "$tag_version" ]; then
echo "Release tag v${tag_version} does not match Cargo.toml version ${crate_version}" >&2
exit 1
fi

- name: Install Cross-compiler (Linux ARM64 only)
if: matrix.install_cross != ''
run: ${{ matrix.install_cross }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "why-cli"
version = "0.1.0"
version = "0.3.0"
edition = "2024"
authors = ["akira ueno"]
description = "Tells you why a command is installed on your system."
Expand Down
2 changes: 1 addition & 1 deletion nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

rustPlatform.buildRustPackage {
pname = "why-cli";
version = "0.1.0";
version = (builtins.fromTOML (builtins.readFile ../Cargo.toml)).package.version;

src = lib.cleanSource ../.;
cargoLock.lockFile = ../Cargo.lock;
Expand Down