Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add riscv32 and riscv64 support #62

Merged
merged 3 commits into from
Nov 7, 2022
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
* `ppcle_64` - if the value is `ppc64le`
* `s390_32` - if the value is `s390`
* `s390_64` if the value is `s390x`
* `riscv` if the value is `riscv`
* `riscv` if the value is `riscv` or `riscv32`
* `riscv64` if the value is `riscv64`
* `e2k` if the value is `e2k`

Note: The bitness part of this property relies on the bitness of the JVM binary, e.g. You'll get the property that ends with `_32` if you run a 32-bit JVM on a 64-bit OS.
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/kr/motd/maven/os/Detector.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,12 @@ private static String normalizeArch(String value) {
if ("s390x".equals(value)) {
return "s390_64";
}
if ("riscv".equals(value)) {
if (value.matches("^(riscv|riscv32)$")) {
return "riscv";
}
if ("riscv64".equals(value)) {
return "riscv64";
}
if ("e2k".equals(value)) {
return "e2k";
}
Expand Down