Compare commits

...

3 Commits

Author SHA1 Message Date
Robin Avery a2cae4f82a
Check if git tag matches Cargo version when releasing (#44)
* Check if git tag matches Cargo version when releasing

* Specify `bash` explicitly
2024-02-28 21:15:04 -07:00
Luke Street a41745fb97 Version 0.7.4 2024-02-28 19:39:13 -07:00
Robin Avery a94edb573f
Emit an error code when `dol diff` does not match (#43)
* Emit an error code when `dol diff` does not match

* `exit(1)` instead of `bail`
2024-02-28 19:18:58 -07:00
4 changed files with 17 additions and 4 deletions

View File

@ -119,6 +119,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check git tag against Cargo version
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
set -eou
version=$(grep '^version' Cargo.toml | awk -F' = ' '{print $2}' | tr -d '"')
version="v$version"
tag='${{github.ref}}'
tag="${tag#refs/tags/}"
if [ "$tag" != "$version" ]; then
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
exit 1
fi
- name: Install dependencies
if: matrix.packages != ''
run: |

2
Cargo.lock generated
View File

@ -295,7 +295,7 @@ dependencies = [
[[package]]
name = "decomp-toolkit"
version = "0.7.3"
version = "0.7.4"
dependencies = [
"anyhow",
"ar",

View File

@ -3,7 +3,7 @@ name = "decomp-toolkit"
description = "Yet another GameCube/Wii decompilation toolkit."
authors = ["Luke Street <luke@street.dev>"]
license = "MIT OR Apache-2.0"
version = "0.7.3"
version = "0.7.4"
edition = "2021"
publish = false
repository = "https://github.com/encounter/decomp-toolkit"

View File

@ -1534,7 +1534,7 @@ fn diff(args: DiffArgs) -> Result<()> {
linked_sym.address,
);
}
return Ok(());
std::process::exit(1);
}
}
@ -1575,7 +1575,7 @@ fn diff(args: DiffArgs) -> Result<()> {
);
log::error!("Original: {}", hex::encode_upper(orig_data));
log::error!("Linked: {}", hex::encode_upper(linked_data));
return Ok(());
std::process::exit(1);
}
}