1. Identify the executable and choose an update route
Use this page when you already have OneSource installed and want a newer version. No demo project is required: updating acts on the executable, not the current project. First record the installed version:
onesource --versionA line such as onesource 3.5.1 identifies the binary version; this number is illustrative, not a claim about the latest release. Identify which installation your shell finds. On macOS/Linux:
command -v onesourceOn Windows PowerShell:
Get-Command onesourceCheck the returned path. If it is a compatible prebuilt binary, follow self-update below. If installed with Cargo or built for a custom platform, use the Cargo/source steps. Multiple installations can make a successful update appear ineffective if PATH later picks another binary. Read Installation if no executable is found.
2. Update a compatible prebuilt binary
You need internet access to GitHub, a supported release asset and write access to the executable’s directory. Run the update command without a project path or profile options:
onesource updateRead the printed Target, Current version and Latest version. If it says Already up to date., it did not download or replace anything. Otherwise it downloads beside the executable. On Unix, expect an Updated onesource message; on Windows it launches replacement after the process exits. Open a new terminal before checking:
onesource --versionCompare this with the Latest version that the update printed and verify the selected executable path again. The project and .onesourcerc are not part of the update. If permission or network errors occurred, do not treat a download message alone as completion; follow recovery below.
Current version comparison strips v/V and prerelease suffixes and compares numeric dot components; nonnumeric versions fall back to normalized inequality. This is not complete SemVer ordering. The command uses GitHub’s latest-release metadata, not a user-selected version.
3. Update Cargo installs or rebuild source
For a Cargo installation, keep your platform’s native build by rebuilding the crate. You need Rust, Cargo, a linker and network access to obtain dependencies:
cargo install onesource --forceExpect Cargo to finish installation, then verify onesource --version and the command path. Cargo normally installs to ~/.cargo/bin (Windows: %USERPROFILE%\.cargo\bin), or CARGO_HOME/bin when customized. If an older system binary takes priority, fix PATH or invoke the newly installed executable directly.
For a fresh source build, clone into a new directory, then build:
git clone https://github.com/TW-RF54732/onesource.git
cd onesource
cargo build --releaseAfter Cargo finishes successfully, verify the built artifact directly on macOS/Linux:
./target/release/onesource --versionOn Windows PowerShell use:
.\target\release\onesource.exe --versionBuilding does not install the result onto PATH. You can run this path directly or copy the binary to the intended executable location and verify that location. For an existing source checkout, obtain the desired source revision while preserving your own changes, then rebuild. Self-update would replace a Cargo/source binary with a published prebuilt asset; use rebuilding when custom architecture or build settings must be preserved.
4. Recover from an unsuccessful update
Work from the actual error, not repeated retries. For a permission failure, inspect Target and choose a writable installation location; reinstall a portable binary there or use Cargo. For network/API-limit or missing-asset errors, open manual download instructions and select the matching asset from GitHub Releases. After replacing or reinstalling, verify the direct path and --version before relying on PATH.
Published assets are Windows x86_64 onesource.exe, Linux x86_64 GNU onesource-linux, macOS Intel onesource-macos and Apple Silicon onesource-macos-arm64. Linux/Windows self-update selection does not check architecture, so other architectures should rebuild. Unsupported OS or macOS architecture fails. Unix requires sh, curl, grep, cut, head and chmod; Windows uses PowerShell. No checksum verification or transactional rollback is implemented. A failed update may leave onesource-update-PID next to the binary: ensure no update is still running before removing an identified leftover. The Unix installer’s completion banner alone is not verification; always run --version.