Skip to content

Install ipmicli with one command: curl | sh, irm | iex (#163) - #177

Merged
bertysentry merged 1 commit into
mainfrom
163-one-command-installation-of-the-ipmicli-command-curl-sh-irm-iex
Oct 14, 2026
Merged

bertysentry merged 1 commit into
mainfrom
163-one-command-installation-of-the-ipmicli-command-curl-sh-irm-iex

Conversation

@bertysentry

Copy link
Copy Markdown
Contributor

Closes #163.

What changed

  • src/site/resources/get (Linux/macOS) and get.ps1 (Windows), ported from Jawk with the IPMICLI_* names. They download the standalone jar of the latest release (or IPMICLI_VERSION) and verify its SHA-256 in a temporary location, so a mismatch leaves an existing installation untouched. Then they install an ipmicli launcher:
    • Linux/macOS: the jar in ${XDG_DATA_HOME:-~/.local/share}/ipmicli, the launcher in ~/.local/bin (IPMICLI_INSTALL_DIR); the installer prints the PATH line when that directory is not on the PATH.
    • Windows: everything under %LOCALAPPDATA%\ipmicli, with an ipmicli.cmd shim whose directory is added to the user PATH.
  • The launchers look for Java 8 or later each time they run: IPMICLI_JAVA_HOME, JAVA_HOME, java on the PATH, then on Linux/macOS /usr/libexec/java_home, sdkman and /usr/lib/jvm. Without one they exit with code 127 and point to adoptium.net. They export IPMICLI_PROGRAM_NAME, so the usage names ipmicli and not java -jar ....
  • release.yml: a standalone-assets job runs after the shared release workflow, which uploads the versioned jars only. It adds the ipmi-java-standalone.jar alias and the .sha256 checksums of both jars to the GitHub release, so releases/latest/download/ipmi-java-standalone.jar is a stable URL that needs no API call.
  • installers.yml: smoke tests of both installers against the real latest release (Ubuntu; Windows PowerShell 5.1 and PowerShell 7). They run on pull requests that touch the installers and weekly, and check: install, --version = the release version, --help naming ipmicli, a pinned reinstall in place, and exit 127 + adoptium without Java. On Windows they also check IPMICLI_JAVA_HOME and the refusal of a fake Java 7.
  • Docs: installation.md and cli.md now lead with the one-liners (tabs, then how to inspect the script first, then the manual download). The CLI page uses ipmicli throughout and lists the launcher's exit code 127. The README CLI section, index.md, upgrading.md and the README release instructions are updated too.
  • .gitattributes keeps get in LF.

Differences from Jawk

  • The checksum is mandatory: the install fails if it is missing or no sha256sum/shasum is available. Every release that has the jar publishes one.
  • There is no fallback (GitHub API lookup) for releases without the version-less alias, and no *_DATA_DIR or *_CLASSPATH setting: no release before 2.0.00 has the command-line client.

For the reviewer

  • The smoke tests are skipped on this PR. The latest release, v1.2.02, has no standalone jar, so a probe job ends with a notice and the installer jobs don't run. They start running on their own once 2.0.00 is released; trigger installers.yml by hand after that release.
  • Release timing. Between the creation of the GitHub release and the end of standalone-assets (about a minute), the "latest" installers fail with a clear message. If that job fails, re-run it.
  • The site URLs (https://metricshub.org/ipmi-java/get, get.ps1) go live with the site of the next release. Both scripts are shipped unchanged in target/site.
  • Tested locally against a copy of the release layout served by a local HTTP server:
    • Linux: WSL Ubuntu, where /bin/sh is dash.
    • Windows: Windows PowerShell 5.1 (PowerShell 7 is covered by CI only).
    • Both: install, --version/--help, pinned reinstall, a missing release, a tampered jar (aborts, existing jar unchanged), and no Java (exit 127).
    • Linux only: a relative IPMICLI_INSTALL_DIR and the PATH note. Windows only: IPMICLI_JAVA_HOME alone.
  • mvn clean verify site passes.

🤖 Generated with Claude Code

Port Jawk's installers to the documentation site:

- src/site/resources/get (POSIX sh): downloads the standalone jar of the
  latest release (or IPMICLI_VERSION), verifies its SHA-256 checksum in a
  temporary directory before touching an existing installation, installs
  it under ${XDG_DATA_HOME:-~/.local/share}/ipmicli and an ipmicli
  launcher in ~/.local/bin (IPMICLI_INSTALL_DIR), and prints the PATH line
  when needed.
- src/site/resources/get.ps1 (PowerShell): the same under
  %LOCALAPPDATA%\ipmicli, with an ipmicli.cmd shim added to the user PATH.
- The launchers find Java 8 or later at run time (IPMICLI_JAVA_HOME,
  JAVA_HOME, PATH, java_home on macOS, sdkman, /usr/lib/jvm), exit 127
  with a pointer to adoptium.net without one, and export
  IPMICLI_PROGRAM_NAME so the usage names ipmicli.

Unlike Jawk, the checksum is mandatory and there is no fallback for
releases without the version-less alias: no release before 2.0.00 has the
command-line client.

release.yml gets a job after the shared release workflow that uploads the
ipmi-java-standalone.jar alias and the .sha256 checksums of both jars.
installers.yml runs both installers against the latest release on pull
requests that touch them and weekly; it skips with a notice while the
latest release has no standalone jar (1.2.02).

Tested against a local copy of the release layout: WSL Ubuntu (dash) and
Windows PowerShell 5.1 (install, --version, --help, pinned reinstall,
tampered jar leaves the installation untouched, missing release, no Java).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T17:40:16.938864Z 5a7e518 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bertysentry
bertysentry merged commit 78ce4fe into main Oct 14, 2026
7 checks passed
@bertysentry
bertysentry deleted the 163-one-command-installation-of-the-ipmicli-command-curl-sh-irm-iex branch October 14, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One-command installation of the ipmicli command (curl | sh, irm | iex)

1 participant