{{Header}}
{{#seo:
|description=derivative-update, a secure Git repository updater for derivative-maker. Supports signed tag, branch, and commit updates with digital software signature verification, submodule synchronization, and automatic rollback on errors.
}}
{{title|title=
derivative-update - Source Code Updater
}}
{{build_mininav}}
{{intro|
derivative-update
is a secure command-line tool for updating a derivative-maker Git repository and its submodules.
It supports updating to specific signed commits, branches, or tags with verification, submodule synchronization, and rollback protection in case of errors. This tool ensures a consistent, trusted codebase.
}}
'''Purpose:'''
derivative-update
safely updates a derivative-maker Git repository (and its submodules) to a specific signed commit, branch, or tag, while verifying integrity and rolling back on errors.
'''Key functions:'''
* Checks environment: Ensures it is not run as root and that the repository is clean unless explicitly allowed to have uncommitted changes.
* Performs safety checks: Runs Git sanity test to verify repository state and digital software signatures.
* Fetches updates: Retrieves latest changes from remote repository and submodules.
* Handles tag updates: Verifies and checks out the tag, then updates submodules.
* Handles branch updates: Checks out the branch, fast-forwards to upstream, verifies commit, and updates submodules.
* Submodule synchronization: Ensures submodule URLs match .gitmodules
and updates them to recorded commits.
* Error recovery: If verification or updates fail, resets repository to a known good commit.
* Final checks: Ensures no unexpected uncommitted changes remain and runs git describe
for informational purposes.
'''Usage:'''
derivative-update
can be found in the root of derivative-maker
source code folder.
Example. To update to the latest signed git tag.
{{CodeSelect|code=
./derivative-update --tag latest
}}
'''Options:'''
* Parses update options: Supports:
** --tag → Move to a specific signed tag
** --tag latest → Move to the latest signed tag
** --ref [ → Move to a specific commit or branch
** --update-only → Only update submodules
'''Summary:'''
]derivative-update
safely updates code and submodules to the requested state with verification and rollback protection.
{{reflist|close=1}}
{{Footer}}
[[Category:Development]]