Skip to content
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
11 changes: 11 additions & 0 deletions README-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,26 @@ Usa restricciones de versión estilo Composer:
<!-- Restricciones de rango -->
<download software="temporal" version="^1.20.0" />
<download software="dolt" version="~0.50.0" />
<!-- Y con un espacio o una coma, O con ||, rangos con guion, comodines, exclusiones -->
<download software="buf" version="^1.28 || ^2.0" />
<download software="protoc" version="25.0 - 26.1" />
<download software="mago" version="1.0.*, !=1.0.1" />

<!-- Restricciones de estabilidad -->
<download software="tool" version="^1.0.0@beta" />

<!-- Pre-release exacto: solo ese, su estabilidad se deduce de él -->
<download software="rr" version="2025.1.0-rc.2" />
<!-- A partir de un pre-release: rc.1, rc.2, el 2025.1.0 final y los 2025.x posteriores con estabilidad RC o superior -->
<download software="rr" version="^2025.1.0-rc.1" />

<!-- Releases experimentales (automáticamente establece estabilidad preview) -->
<download software="experimental" version="^1.0.0-experimental" />
</actions>
```

Un pre-release en una restricción fija la estabilidad mínima con cualquier operador, incluso en `<3.5.0-beta.2`; redúcela con `@alpha` o `@dev`. Una palabra clave sin número también es un límite, como en Composer: `>2.0-beta` acepta `2.0.0-RC1` y `2.0.0`. Una versión exacta con pre-release u otro sufijo solo coincide con esa etiqueta: `2.0-beta` no acepta `2.0.0-beta.3` ni `2.0.0`, y `2.12.0-hotfix` no acepta `2.12.0-hotfix.2`. Las mayúsculas no importan: `1.0.0-arm64` coincide con la etiqueta `1.0.0-ARM64`, y `^1.0-Linux` acepta `1.0.0-linux`. Un pre-release puede ir pegado al número, como en las etiquetas: `^2.0.0rc1`.

### Opciones de Configuración Avanzadas

```xml
Expand Down
11 changes: 11 additions & 0 deletions README-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,26 @@ DLoad поддерживает три типа загрузки, которые
<!-- Диапазонные ограничения -->
<download software="temporal" version="^1.20.0" />
<download software="dolt" version="~0.50.0" />
<!-- И через пробел или запятую, ИЛИ через ||, диапазоны через дефис, маски, исключения -->
<download software="buf" version="^1.28 || ^2.0" />
<download software="protoc" version="25.0 - 26.1" />
<download software="mago" version="1.0.*, !=1.0.1" />

<!-- Ограничения стабильности -->
<download software="tool" version="^1.0.0@beta" />

<!-- Конкретный pre-release: только он, стабильность берётся из него -->
<download software="rr" version="2025.1.0-rc.2" />
<!-- Начиная с pre-release: rc.1, rc.2, финальный 2025.1.0 и более поздние 2025.x со стабильностью не ниже RC -->
<download software="rr" version="^2025.1.0-rc.1" />

<!-- Feature-релизы (автоматически устанавливает preview-стабильность) -->
<download software="experimental" version="^1.0.0-experimental" />
</actions>
```

Pre-release в ограничении задаёт минимальную стабильность при любом операторе, даже в `<3.5.0-beta.2`; понизить её можно через `@alpha` или `@dev`. Ключевое слово без номера тоже служит границей, как в Composer: `>2.0-beta` берёт `2.0.0-RC1` и `2.0.0`. Точная версия с pre-release или другим суффиксом совпадает только с этим тегом: `2.0-beta` не берёт ни `2.0.0-beta.3`, ни `2.0.0`, а `2.12.0-hotfix` не берёт `2.12.0-hotfix.2`. Регистр не важен: `1.0.0-arm64` совпадает с тегом `1.0.0-ARM64`, а `^1.0-Linux` берёт `1.0.0-linux`. Pre-release может идти сразу за номером, как в тегах: `^2.0.0rc1`.

### Расширенные настройки

```xml
Expand Down
11 changes: 11 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,26 @@ DLoad 支持三种下载类型,它们决定了资源的处理方式:
<!-- 范围约束 -->
<download software="temporal" version="^1.20.0" />
<download software="dolt" version="~0.50.0" />
<!-- 空格或逗号表示“与”,|| 表示“或”,连字符范围、通配符、排除 -->
<download software="buf" version="^1.28 || ^2.0" />
<download software="protoc" version="25.0 - 26.1" />
<download software="mago" version="1.0.*, !=1.0.1" />

<!-- 稳定性约束 -->
<download software="tool" version="^1.0.0@beta" />

<!-- 指定预发布版本:只匹配该版本,稳定性由其推断 -->
<download software="rr" version="2025.1.0-rc.2" />
<!-- 从某个预发布版本起:rc.1、rc.2、正式版 2025.1.0 及之后稳定性不低于 RC 的 2025.x -->
<download software="rr" version="^2025.1.0-rc.1" />

<!-- 功能版本(自动设置预览稳定性) -->
<download software="experimental" version="^1.0.0-experimental" />
</actions>
```

约束中的预发布版本会为任何运算符设定最低稳定性,即使是 `<3.5.0-beta.2`;可用 `@alpha` 或 `@dev` 降低。不带编号的关键字也是边界,与 Composer 一致:`>2.0-beta` 会选中 `2.0.0-RC1` 和 `2.0.0`。带预发布或其他后缀的精确版本只匹配该标签:`2.0-beta` 不会选中 `2.0.0-beta.3` 或 `2.0.0`,`2.12.0-hotfix` 也不会选中 `2.12.0-hotfix.2`。大小写无关:`1.0.0-arm64` 匹配标签 `1.0.0-ARM64`,`^1.0-Linux` 会选中 `1.0.0-linux`。预发布版本可以像标签那样紧跟在版本号后面:`^2.0.0rc1`。

### 高级配置选项

```xml
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,26 @@ Use Composer-style version constraints:
<!-- Range constraints -->
<download software="temporal" version="^1.20.0" />
<download software="dolt" version="~0.50.0" />
<!-- AND by a space or a comma, OR by ||, hyphen ranges, wildcards, exclusions -->
<download software="buf" version="^1.28 || ^2.0" />
<download software="protoc" version="25.0 - 26.1" />
<download software="mago" version="1.0.*, !=1.0.1" />

<!-- Stability constraints -->
<download software="tool" version="^1.0.0@beta" />

<!-- Exact pre-release: only this one, its stability is implied -->
<download software="rr" version="2025.1.0-rc.2" />
<!-- From a pre-release on: rc.1, rc.2, the final 2025.1.0 and later 2025.x of RC stability or higher -->
<download software="rr" version="^2025.1.0-rc.1" />

<!-- Feature releases (automatically sets preview stability) -->
<download software="experimental" version="^1.0.0-experimental" />
</actions>
```

A pre-release in a constraint sets the minimum stability for any operator, even for `<3.5.0-beta.2`; lower it with `@alpha` or `@dev`. A keyword without a number is a bound too, as in Composer: `>2.0-beta` takes `2.0.0-RC1` and `2.0.0`. An exact version with a pre-release or another suffix matches only that tag: `2.0-beta` takes neither `2.0.0-beta.3` nor `2.0.0`, and `2.12.0-hotfix` not `2.12.0-hotfix.2`. Case does not matter: `1.0.0-arm64` matches the tag `1.0.0-ARM64`, and `^1.0-Linux` takes `1.0.0-linux`. A pre-release may follow the number right away, as in tags: `^2.0.0rc1`.

### Advanced Configuration Options

```xml
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
],
"require": {
"php": ">=8.2",
"composer/semver": "^3.4",
"internal/container": "^1.0",
"internal/destroy": "^1.0",
"internal/path": "^1.2",
Expand All @@ -36,6 +35,7 @@
},
"require-dev": {
"buggregator/trap": "^1.15",
"composer/semver": "^3.4",
"dereuromark/composer-prefer-lowest": "^0.1.10",
"llm/skills": "^1.9",
"roxblnfk/unpoly": "^1.8.1",
Expand Down
156 changes: 78 additions & 78 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dload.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
• "~1.0.0" - Tilde constraint
• "^2.12.0-feature" - With feature suffix
• "^2.12.0@beta" - With explicit stability
• "^2.12.0-hotfix@rc" - Combined feature and stability
• "^2.12.0-hotfix@alpha" - Feature builds, alpha ones included
• "2025.1.0-rc.2" - One pre-release
• "^2025.1.0-rc.1" - Range from a pre-release on
• ">=1.0 &lt;2.0 || ^3.0" - Range and alternatives
</xs:documentation>
</xs:annotation>
</xs:attribute>
Expand Down
2 changes: 1 addition & 1 deletion skills/dload-fetch-tool/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Done when the block has a `<repository>` whose `asset-pattern` matches every OS/
| Attribute | Purpose |
|---|---|
| `software` | Alias or name of the tool (built-in or inline). Required. |
| `version` | Composer-style constraint: `^2025.1`, `~1.0.0`, `^2.12.0@beta`, `^2.12.0-hotfix@rc`. Omit for latest stable. Stability order follows Composer, `stable` by default. |
| `version` | Composer-style constraint: `^2025.1`, `~1.0.0`, `^2.12.0@beta`, `^2.12.0-hotfix@alpha` (feature builds, alpha ones included), one pre-release like `2025.1.0-rc.2`, or a range from one like `^2025.1.0-rc.1`. Omit for latest stable. Pre-releases order by stability (`nightly < snapshot < dev < unstable < alpha < preview < beta < pre < RC < stable`), then by number; `stable` by default. A pre-release in a constraint sets the minimum stability for any operator, even `<3.5.0-beta.2`; lower it with `@alpha`/`@dev`. A keyword without a number is a bound too: `>2.0-beta` takes `2.0.0-RC1` and `2.0.0`. An exact version with a pre-release or another suffix is that one tag: `2.0-beta` skips `2.0.0-beta.3`, `2.12.0-hotfix` skips `2.12.0-hotfix.2`; after `^`, `~` or a comparison a non-stability suffix is a feature the tag must contain. A tagged build like `2025.1.0-rc.2-linux` orders right after its pre-release: an exact `2025.1.0-rc.2` skips it, `>2025.1.0-rc.2` takes it. Numbers may have more than three parts (`1.2.3.4`), in constraints too (`>=1.2.3.4.5`); trailing zero parts and build metadata don't count (`1.2.3` = `1.2.3.0` = `1.2.3+build.5`). Case doesn't matter (`-ARM64` = `-arm64`, `^1.0-Linux` takes `1.0.0-linux`), and a pre-release may be glued to the number as in tags (`^2.0.0rc1`). |
| `extract-path` | Target folder (default: project root). |
| `type` | `binary` (default), `phar` (required for PHAR — skips extraction), `archive` (unpack the whole asset keeping its folder layout). |

Expand Down
2 changes: 1 addition & 1 deletion skills/dload-fetch-tool/references/registry-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ How to describe a tool dload does not ship, as a `<software>` block inside `<reg
| grep -oE '"name": "[^"]+"'
```
4. **Sibling tools in the same release to exclude** — e.g. `bufbuild/buf` ships `buf-*` alongside `protoc-gen-buf-breaking-*` / `protoc-gen-buf-lint-*`; only `buf-*` is wanted.
5. **The version command** — usually `--version`; some tools use `version` or have none.
5. **The version command** — usually `--version`; some tools use `version` or have none. dload reads the first `X.Y.Z` in its output with every further dotted part (`1.2.3.4`) and a pre-release or build suffix, and compares it with `version` to decide whether the installed binary is up to date; trailing zero parts don't count, so `1.2.3.0` satisfies `1.2.3`.
6. **Artefact type** — native binary (per OS/arch) or PHAR (one platform-independent `.phar`).

## `asset-pattern`
Expand Down
2 changes: 2 additions & 0 deletions skills/dload-fetch-tool/references/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ curl -s "https://api.github.com/repos/<owner>/<repo>/releases?per_page=20" \
```

- `prerelease: true` while `version` demands stable → lower the stability (`@beta`/`@RC`/`@alpha`).
- Tag has a word after the number (`1.2.0-linux`, `1.2.0-arm64`) → a feature build of preview stability, skipped while `version` demands stable. Only a whole stability word marks a pre-release (`-beta2`, `rc1`, `-a1`): `-arm64` or `-build.5` is not alpha or beta.
- `version` is an exact version with a suffix (`2.12.0-hotfix`, `2025.1.0-rc.2`) → it matches only that tag, not `2.12.0-hotfix.2` or `2025.1.0-rc.2-linux`; use `^` or `>=` to take later builds.
- `draft: true` → invisible to dload until published.
- Tags carry text before the version (`bun-v1.4.2`, `cli-v2.0.0`) → set `tag-prefix` on the `<repository>`; without it the tags do not parse and every release is skipped. See [`registry-entry.md`](registry-entry.md#tag-prefix).
- Tag is on GitHub but dload picks an older one → the version registry still holds a fresh check; rerun with `dload get --refresh`. A release inserted below the top of the listing (e.g. a GitLab release with a backdated date) needs `dload cache:clear <alias>`. See [`version-registry.md`](version-registry.md).
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Binary/Binary.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getPath(): Path;
public function exists(): bool;

/**
* Gets the binary version.
* Gets the binary version as printed, with its pre-release and build metadata, e.g. `2.3.4+20230415`.
*
* @return non-empty-string|null Version string or null if not available
*/
Expand Down
Loading
Loading