mirror of
https://github.com/chenasraf/sofmani.git
synced 2026-05-17 17:28:04 +00:00
feat: add repo_update control modes
This commit is contained in:
@@ -23,6 +23,22 @@ Here is a breakdown of all configuration options:
|
||||
- Enable or disable checking for updates before running operations.
|
||||
- Default: `false`.
|
||||
|
||||
- **`repo_update`** (Object)
|
||||
- Controls how repository index updates (e.g. `apt update`, `brew update`) are handled per
|
||||
installer type. Keys are installer types, values are one of:
|
||||
- `once` — Run the repo update at most once per sofmani run (default).
|
||||
- `always` — Run the repo update before every install/update operation.
|
||||
- `never` — Skip the repo update entirely.
|
||||
- Supported types: `brew`, `apt`, `apk`.
|
||||
- Default: `once` for all supported types.
|
||||
- Example:
|
||||
```yaml
|
||||
repo_update:
|
||||
brew: once
|
||||
apt: always
|
||||
apk: never
|
||||
```
|
||||
|
||||
- **`summary`** (Boolean)
|
||||
- Enable or disable the installation summary at the end.
|
||||
- The summary shows newly installed and upgraded software in a hierarchical format.
|
||||
@@ -73,6 +89,9 @@ debug: false
|
||||
check_updates: true
|
||||
summary: true
|
||||
category_display: border
|
||||
repo_update:
|
||||
brew: once
|
||||
apt: once
|
||||
defaults:
|
||||
type:
|
||||
brew:
|
||||
|
||||
@@ -493,6 +493,9 @@ install:
|
||||
|
||||
- **`brew`**
|
||||
- **Description**: Installs packages using Homebrew.
|
||||
- **Repo update**: Brew auto-updates its index on each command. By default, sofmani lets the first
|
||||
brew command auto-update normally and suppresses it for subsequent ones (`once` mode). Configure
|
||||
via the top-level [`repo_update`](./configuration-reference.md#global-options) option.
|
||||
|
||||
- **Options**:
|
||||
- `opts.tap`: Name of the tap to install the package from.
|
||||
@@ -513,6 +516,9 @@ install:
|
||||
- **`apt`/`apk`**
|
||||
- **Description**: Installs packages using apt install or apt add.
|
||||
- Use `type: apt` for `apt install`, and `type: apk` for `apk add`.
|
||||
- **Repo update**: Runs `apt update` or `apk update` before installing. By default, the update
|
||||
runs at most once per sofmani run (`once` mode). Configure via the top-level
|
||||
[`repo_update`](./configuration-reference.md#global-options) option.
|
||||
- **Options**:
|
||||
- `opts.flags`: Additional flags to pass to commands (fallback for install/update).
|
||||
- `opts.install_flags`: Additional flags to pass only during install.
|
||||
|
||||
Reference in New Issue
Block a user