Compare commits
1 Commits
main
...
pre-commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
435d1634f3 |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
name: Bug report
|
name: Bug report
|
||||||
about: Topgrade is misbehaving
|
about: Topgrade is misbehaving
|
||||||
title: ''
|
title: ''
|
||||||
type: Bug
|
labels: 'C-bug'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
name: General feature request
|
name: General feature request
|
||||||
about: Suggest a general feature, or feature within an already existing step
|
about: Suggest a general feature, or feature within an already existing step
|
||||||
title: ''
|
title: ''
|
||||||
type: Feature
|
labels: C-feature request
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
3
.github/ISSUE_TEMPLATE/step_request.md
vendored
3
.github/ISSUE_TEMPLATE/step_request.md
vendored
@@ -2,8 +2,7 @@
|
|||||||
name: New step request
|
name: New step request
|
||||||
about: Suggest a new step/package manager to update
|
about: Suggest a new step/package manager to update
|
||||||
title: ''
|
title: ''
|
||||||
type: Feature
|
labels: C-feature request, request step
|
||||||
labels: request step
|
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/check_i18n.yml
vendored
2
.github/workflows/check_i18n.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
security-events: write
|
security-events: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -32,6 +32,6 @@ jobs:
|
|||||||
uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1.0.16
|
uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1.0.16
|
||||||
|
|
||||||
- name: Upload DevSkim scan results to GitHub Security tab
|
- name: Upload DevSkim scan results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
|
uses: github/codeql-action/upload-sarif@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
|
||||||
with:
|
with:
|
||||||
sarif_file: devskim-results.sarif
|
sarif_file: devskim-results.sarif
|
||||||
|
|||||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ jobs:
|
|||||||
matrix_target: ${{ matrix.target }}
|
matrix_target: ${{ matrix.target }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/create_release_assets.yml
vendored
4
.github/workflows/create_release_assets.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
tag: ${{ github.event.client_payload.tag }}
|
tag: ${{ github.event.client_payload.tag }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ jobs:
|
|||||||
matrix_target: ${{ matrix.target }}
|
matrix_target: ${{ matrix.target }}
|
||||||
tag: ${{ github.event.client_payload.tag }}
|
tag: ${{ github.event.client_payload.tag }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/dependency-review.yml
vendored
2
.github/workflows/dependency-review.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/release-plz.yml
vendored
4
.github/workflows/release-plz.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
id-token: write # For trusted publishing
|
id-token: write # For trusted publishing
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|||||||
2
.github/workflows/release_to_homebrew.yml
vendored
2
.github/workflows/release_to_homebrew.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Bump formulae
|
- name: Bump formulae
|
||||||
uses: dawidd6/action-homebrew-bump-formula@c5ddc585e75f0f750a8b4f610688b4bec9e80915 # v6
|
uses: dawidd6/action-homebrew-bump-formula@3428a0601bba3173ec0bdcc945be23fa27aa4c31 # v5
|
||||||
with:
|
with:
|
||||||
# Custom GitHub access token with only the 'public_repo' scope enabled
|
# Custom GitHub access token with only the 'public_repo' scope enabled
|
||||||
token: ${{secrets.HOMEBREW_ACCESS_TOKEN}}
|
token: ${{secrets.HOMEBREW_ACCESS_TOKEN}}
|
||||||
|
|||||||
8
.github/workflows/release_to_pypi.yml
vendored
8
.github/workflows/release_to_pypi.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
target: [x86_64, x86, aarch64]
|
target: [x86_64, x86, aarch64]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
target: [x64, x86]
|
target: [x64, x86]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
target: [x86_64, aarch64]
|
target: [x86_64, aarch64]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
sdist:
|
sdist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/scorecards.yml
vendored
4
.github/workflows/scorecards.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -71,6 +71,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
|
uses: github/codeql-action/upload-sarif@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ repos:
|
|||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.39.2
|
rev: v1
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -7,40 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [16.4.2](https://github.com/topgrade-rs/topgrade/compare/v16.4.1...v16.4.2) - 2025-11-20
|
|
||||||
|
|
||||||
### Other
|
|
||||||
|
|
||||||
- *(deps)* update dawidd6/action-homebrew-bump-formula action to v6 ([#1543](https://github.com/topgrade-rs/topgrade/pull/1543))
|
|
||||||
|
|
||||||
## [16.4.1](https://github.com/topgrade-rs/topgrade/compare/v16.4.0...v16.4.1) - 2025-11-20
|
|
||||||
|
|
||||||
### Other
|
|
||||||
|
|
||||||
- refactor run_containers error handling ([#1541](https://github.com/topgrade-rs/topgrade/pull/1541))
|
|
||||||
|
|
||||||
## [16.4.0](https://github.com/topgrade-rs/topgrade/compare/v16.3.0...v16.4.0) - 2025-11-20
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- *(os)* add Origami Linux support ([#1530](https://github.com/topgrade-rs/topgrade/pull/1530))
|
|
||||||
- *(containers)* add option to run `system prune` ([#1523](https://github.com/topgrade-rs/topgrade/pull/1523))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- *(deps)* restore custom commands order ([#1535](https://github.com/topgrade-rs/topgrade/pull/1535))
|
|
||||||
|
|
||||||
### Other
|
|
||||||
|
|
||||||
- *(deps)* update clap, clap_builder, clap_complete ([#1540](https://github.com/topgrade-rs/topgrade/pull/1540))
|
|
||||||
- *(deps)* update github/codeql-action action to v4.31.4 ([#1531](https://github.com/topgrade-rs/topgrade/pull/1531))
|
|
||||||
- *(config)* add custom commands order test ([#1536](https://github.com/topgrade-rs/topgrade/pull/1536))
|
|
||||||
- make Config methods more consistent by utilizing `#[derive(Default)]` ([#1534](https://github.com/topgrade-rs/topgrade/pull/1534))
|
|
||||||
- *(issue templates)* use issue types ([#1533](https://github.com/topgrade-rs/topgrade/pull/1533))
|
|
||||||
- *(deps)* lock file maintenance ([#1505](https://github.com/topgrade-rs/topgrade/pull/1505))
|
|
||||||
- *(deps)* update actions/checkout digest to 93cb6ef ([#1526](https://github.com/topgrade-rs/topgrade/pull/1526))
|
|
||||||
- *(deps)* update actions/checkout action to v5.0.1 ([#1527](https://github.com/topgrade-rs/topgrade/pull/1527))
|
|
||||||
|
|
||||||
## [16.3.0](https://github.com/topgrade-rs/topgrade/compare/v16.2.1...v16.3.0) - 2025-11-16
|
## [16.3.0](https://github.com/topgrade-rs/topgrade/compare/v16.2.1...v16.3.0) - 2025-11-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
35
Cargo.lock
generated
35
Cargo.lock
generated
@@ -385,29 +385,19 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.53"
|
version = "4.5.51"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
|
checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "clap-cargo"
|
|
||||||
version = "0.15.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d546f0e84ff2bfa4da1ce9b54be42285767ba39c688572ca32412a09a73851e5"
|
|
||||||
dependencies = [
|
|
||||||
"anstyle",
|
|
||||||
"clap",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.53"
|
version = "4.5.51"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
|
checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@@ -417,9 +407,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_complete"
|
name = "clap_complete"
|
||||||
version = "4.5.61"
|
version = "4.5.60"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "39615915e2ece2550c0149addac32fb5bd312c657f43845bb9088cb9c8a7c992"
|
checksum = "8e602857739c5a4291dfa33b5a298aeac9006185229a700e5810a3ef7272d971"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
]
|
]
|
||||||
@@ -1128,9 +1118,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.16.1"
|
version = "0.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heck"
|
name = "heck"
|
||||||
@@ -1412,12 +1402,12 @@ checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "2.12.1"
|
version = "2.12.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"
|
checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"equivalent",
|
"equivalent",
|
||||||
"hashbrown 0.16.1",
|
"hashbrown 0.16.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_core",
|
"serde_core",
|
||||||
]
|
]
|
||||||
@@ -2974,12 +2964,11 @@ checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "topgrade"
|
name = "topgrade"
|
||||||
version = "16.4.2"
|
version = "16.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64ct",
|
"base64ct",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
"clap-cargo",
|
|
||||||
"clap_complete",
|
"clap_complete",
|
||||||
"clap_mangen",
|
"clap_mangen",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ keywords = ["upgrade", "update"]
|
|||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
repository = "https://github.com/topgrade-rs/topgrade"
|
repository = "https://github.com/topgrade-rs/topgrade"
|
||||||
rust-version = "1.84.1"
|
rust-version = "1.84.1"
|
||||||
version = "16.4.2"
|
version = "16.3.0"
|
||||||
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
|
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
|
||||||
exclude = ["doc/screenshot.gif", "BREAKINGCHANGES_dev.md"]
|
exclude = ["doc/screenshot.gif", "BREAKINGCHANGES_dev.md"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -17,7 +17,7 @@ readme = "README.md"
|
|||||||
home = "=0.5.11"
|
home = "=0.5.11"
|
||||||
etcetera = "=0.10.0"
|
etcetera = "=0.10.0"
|
||||||
serde = { version = "~1.0", features = ["derive"] }
|
serde = { version = "~1.0", features = ["derive"] }
|
||||||
toml = { version = "=0.9.8", features = ["preserve_order"] }
|
toml = "=0.9.8"
|
||||||
which_crate = { version = "~8.0", package = "which" }
|
which_crate = { version = "~8.0", package = "which" }
|
||||||
shellexpand = "~3.1"
|
shellexpand = "~3.1"
|
||||||
clap = { version = "~4.5", features = ["cargo", "derive"] }
|
clap = { version = "~4.5", features = ["cargo", "derive"] }
|
||||||
@@ -51,7 +51,6 @@ serde_json = "1.0.145"
|
|||||||
ignore = "=0.4.23"
|
ignore = "=0.4.23"
|
||||||
globset = "=0.4.16"
|
globset = "=0.4.16"
|
||||||
base64ct = "<1.8.0"
|
base64ct = "<1.8.0"
|
||||||
clap-cargo = "0.15.2"
|
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
mac-notification-sys = { git = "https://github.com/h4llow3En/mac-notification-sys" }
|
mac-notification-sys = { git = "https://github.com/h4llow3En/mac-notification-sys" }
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -3,10 +3,10 @@
|
|||||||
<img alt="Topgrade" src="doc/topgrade_transparent.png" width="850px">
|
<img alt="Topgrade" src="doc/topgrade_transparent.png" width="850px">
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<a href="https://github.com/topgrade-rs/topgrade/releases"><img alt="GitHub Release" src="https://img.shields.io/github/release/topgrade-rs/topgrade.svg"></a>
|
<a href="https://github.com/topgrade-rs/topgrade/releases"><img alt="GitHub Release" src="https://img.shields.io/github/release/topgrade-rs/topgrade.svg"></a>
|
||||||
<a href="https://crates.io/crates/topgrade"><img alt="crates.io" src="https://img.shields.io/crates/v/topgrade.svg"></a>
|
<a href="https://crates.io/crates/topgrade"><img alt="crates.io" src="https://img.shields.io/crates/v/topgrade.svg"></a>
|
||||||
<a href="https://aur.archlinux.org/packages/topgrade"><img alt="AUR" src="https://img.shields.io/aur/version/topgrade.svg"></a>
|
<a href="https://aur.archlinux.org/packages/topgrade"><img alt="AUR" src="https://img.shields.io/aur/version/topgrade.svg"></a>
|
||||||
<a href="https://formulae.brew.sh/formula/topgrade"><img alt="Homebrew" src="https://img.shields.io/homebrew/v/topgrade.svg"></a>
|
<a href="https://formulae.brew.sh/formula/topgrade"><img alt="Homebrew" src="https://img.shields.io/homebrew/v/topgrade.svg"></a>
|
||||||
|
|
||||||
<img alt="Demo" src="doc/topgrade_demo.gif">
|
<img alt="Demo" src="doc/topgrade_demo.gif">
|
||||||
</div>
|
</div>
|
||||||
@@ -37,8 +37,6 @@ To remedy this, **Topgrade** detects which tools you use and runs the appropriat
|
|||||||
- Windows ([Winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)): [
|
- Windows ([Winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)): [
|
||||||
`winget install --id=topgrade-rs.topgrade -e`](https://winstall.app/apps/topgrade-rs.topgrade)
|
`winget install --id=topgrade-rs.topgrade -e`](https://winstall.app/apps/topgrade-rs.topgrade)
|
||||||
- macOS or Linux ([Homebrew](https://brew.sh/)): [`brew install topgrade`](https://formulae.brew.sh/formula/topgrade)
|
- macOS or Linux ([Homebrew](https://brew.sh/)): [`brew install topgrade`](https://formulae.brew.sh/formula/topgrade)
|
||||||
- Fedora/RHEL/AlmaLinux/CentOS-Stream ([Copr](https://copr.fedorainfracloud.org/)): [
|
|
||||||
`sudo dnf copr enable lilay/topgrade && sudo dnf install topgrade`](https://copr.fedorainfracloud.org/coprs/lilay/topgrade/)
|
|
||||||
|
|
||||||
### Community-maintained
|
### Community-maintained
|
||||||
|
|
||||||
@@ -48,6 +46,8 @@ To remedy this, **Topgrade** detects which tools you use and runs the appropriat
|
|||||||
`scoop bucket add main && scoop install main/topgrade`](https://scoop.sh/#/apps?q=topgrade)
|
`scoop bucket add main && scoop install main/topgrade`](https://scoop.sh/#/apps?q=topgrade)
|
||||||
- macOS ([MacPorts](https://www.macports.org/)): [
|
- macOS ([MacPorts](https://www.macports.org/)): [
|
||||||
`sudo port install topgrade`](https://ports.macports.org/port/topgrade/)
|
`sudo port install topgrade`](https://ports.macports.org/port/topgrade/)
|
||||||
|
- Fedora ([Copr](https://copr.fedorainfracloud.org/)): [
|
||||||
|
`dnf copr enable lilay/topgrade && dnf install topgrade`](https://copr.fedorainfracloud.org/coprs/lilay/topgrade/)
|
||||||
- NixOS or Nix (nixpkgs): [topgrade](https://search.nixos.org/packages?show=topgrade)
|
- NixOS or Nix (nixpkgs): [topgrade](https://search.nixos.org/packages?show=topgrade)
|
||||||
- Void Linux: [`sudo xbps-install -S topgrade`](https://voidlinux.org/packages/?arch=x86_64&q=topgrade)
|
- Void Linux: [`sudo xbps-install -S topgrade`](https://voidlinux.org/packages/?arch=x86_64&q=topgrade)
|
||||||
|
|
||||||
|
|||||||
@@ -291,20 +291,6 @@
|
|||||||
# (default: false)
|
# (default: false)
|
||||||
# exclude_encrypted = false
|
# exclude_encrypted = false
|
||||||
|
|
||||||
[mise]
|
|
||||||
# Upgrades to the latest version available, bumping the version in mise.toml
|
|
||||||
# (default: false)
|
|
||||||
# bump = false
|
|
||||||
|
|
||||||
# Number of jobs to run in parallel
|
|
||||||
# (default: 4)
|
|
||||||
# jobs = 4
|
|
||||||
|
|
||||||
# Run interactively
|
|
||||||
# (default: false)
|
|
||||||
# interactive = false
|
|
||||||
|
|
||||||
|
|
||||||
[npm]
|
[npm]
|
||||||
# Use sudo if the NPM directory isn't owned by the current user
|
# Use sudo if the NPM directory isn't owned by the current user
|
||||||
# use_sudo = true
|
# use_sudo = true
|
||||||
@@ -356,10 +342,6 @@
|
|||||||
# Specify the runtime to use for containers (default: "docker", allowed values: "docker", "podman")
|
# Specify the runtime to use for containers (default: "docker", allowed values: "docker", "podman")
|
||||||
# runtime = "podman"
|
# runtime = "podman"
|
||||||
|
|
||||||
# Run 'docker system prune' to clean up unused containers, networks, and build cache
|
|
||||||
# (default: false)
|
|
||||||
# system_prune = false
|
|
||||||
|
|
||||||
[lensfun]
|
[lensfun]
|
||||||
# If disabled, Topgrade invokes `lensfun‑update‑data` without root privilege,
|
# If disabled, Topgrade invokes `lensfun‑update‑data` without root privilege,
|
||||||
# then the update will be only available to you. Otherwise, `sudo` is required,
|
# then the update will be only available to you. Otherwise, `sudo` is required,
|
||||||
|
|||||||
@@ -694,14 +694,6 @@ _version: 2
|
|||||||
zh_CN: "不是专用的 macOS brew"
|
zh_CN: "不是专用的 macOS brew"
|
||||||
zh_TW: "不是專門的 macOS brew"
|
zh_TW: "不是專門的 macOS brew"
|
||||||
de: "Kein angepasstes Brew für macOS"
|
de: "Kein angepasstes Brew für macOS"
|
||||||
"Homebrew cask support on Linux requires Homebrew 4.5.0 or later (found {version})":
|
|
||||||
en: "Homebrew cask support on Linux requires Homebrew 4.5.0 or later (found %{version})"
|
|
||||||
lt: "Homebrew cask palaikymas Linux sistemoje reikalauja Homebrew 4.5.0 arba naujesnes versijos (rasta %{version})"
|
|
||||||
es: "El soporte de cask de Homebrew en Linux requiere Homebrew 4.5.0 o posterior (encontrado %{version})"
|
|
||||||
fr: "Le support de cask Homebrew sur Linux nécessite Homebrew 4.5.0 ou supérieur (trouvé %{version})"
|
|
||||||
zh_CN: "Linux 上的 Homebrew cask 支持需要 Homebrew 4.5.0 或更高版本(找到 %{version})"
|
|
||||||
zh_TW: "Linux 上的 Homebrew cask 支援需要 Homebrew 4.5.0 或更高版本(找到 %{version})"
|
|
||||||
de: "Homebrew-Cask-Unterstützung unter Linux erfordert Homebrew 4.5.0 oder höher (gefunden %{version})"
|
|
||||||
"Guix Pull Failed, Skipping":
|
"Guix Pull Failed, Skipping":
|
||||||
en: "Guix Pull Failed, Skipping"
|
en: "Guix Pull Failed, Skipping"
|
||||||
lt: "Guix traukti nepavyko, praleidžiama"
|
lt: "Guix traukti nepavyko, praleidžiama"
|
||||||
|
|||||||
@@ -5,20 +5,13 @@ build-backend = "maturin"
|
|||||||
[project]
|
[project]
|
||||||
name = "topgrade"
|
name = "topgrade"
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
description = "Upgrade all the things"
|
|
||||||
readme = "README.md"
|
|
||||||
license = "GPL-3.0-or-later"
|
|
||||||
requires-python = ">=3.7"
|
requires-python = ">=3.7"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
||||||
"Programming Language :: Rust",
|
"Programming Language :: Rust",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
|
|
||||||
urls.bugs = "https://github.com/topgrade-rs/topgrade/issues"
|
|
||||||
urls.homepage = "https://github.com/topgrade-rs/topgrade"
|
|
||||||
|
|
||||||
|
|
||||||
[tool.maturin]
|
[tool.maturin]
|
||||||
bindings = "bin"
|
bindings = "bin"
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ pub struct Containers {
|
|||||||
#[merge(strategy = crate::utils::merge_strategies::vec_prepend_opt)]
|
#[merge(strategy = crate::utils::merge_strategies::vec_prepend_opt)]
|
||||||
ignored_containers: Option<Vec<String>>,
|
ignored_containers: Option<Vec<String>>,
|
||||||
runtime: Option<ContainerRuntime>,
|
runtime: Option<ContainerRuntime>,
|
||||||
system_prune: Option<bool>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Debug, Merge)]
|
#[derive(Deserialize, Default, Debug, Merge)]
|
||||||
@@ -173,15 +172,6 @@ pub struct Chezmoi {
|
|||||||
exclude_encrypted: Option<bool>,
|
exclude_encrypted: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Debug, Merge)]
|
|
||||||
#[serde(deny_unknown_fields)]
|
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
|
||||||
pub struct Mise {
|
|
||||||
bump: Option<bool>,
|
|
||||||
interactive: Option<bool>,
|
|
||||||
jobs: Option<u32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Debug, Merge)]
|
#[derive(Deserialize, Default, Debug, Merge)]
|
||||||
#[serde(deny_unknown_fields)]
|
#[serde(deny_unknown_fields)]
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
#[allow(clippy::upper_case_acronyms)]
|
||||||
@@ -213,10 +203,9 @@ pub struct Brew {
|
|||||||
fetch_head: Option<bool>,
|
fetch_head: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone, Copy, Default)]
|
#[derive(Debug, Deserialize, Clone, Copy)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum ArchPackageManager {
|
pub enum ArchPackageManager {
|
||||||
#[default]
|
|
||||||
Autodetect,
|
Autodetect,
|
||||||
Aura,
|
Aura,
|
||||||
GarudaUpdate,
|
GarudaUpdate,
|
||||||
@@ -228,10 +217,9 @@ pub enum ArchPackageManager {
|
|||||||
Yay,
|
Yay,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Deserialize, Default)]
|
#[derive(Clone, Copy, Debug, Deserialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum ContainerRuntime {
|
pub enum ContainerRuntime {
|
||||||
#[default] // defaults to a popular choice
|
|
||||||
Docker,
|
Docker,
|
||||||
Podman,
|
Podman,
|
||||||
}
|
}
|
||||||
@@ -369,11 +357,10 @@ pub struct Misc {
|
|||||||
show_distribution_summary: Option<bool>,
|
show_distribution_summary: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Deserialize, ValueEnum, Default)]
|
#[derive(Clone, Copy, Debug, Deserialize, ValueEnum)]
|
||||||
#[clap(rename_all = "snake_case")]
|
#[clap(rename_all = "snake_case")]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum TmuxSessionMode {
|
pub enum TmuxSessionMode {
|
||||||
#[default]
|
|
||||||
AttachIfNotInSession,
|
AttachIfNotInSession,
|
||||||
AttachAlways,
|
AttachAlways,
|
||||||
}
|
}
|
||||||
@@ -480,9 +467,6 @@ pub struct ConfigFile {
|
|||||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
||||||
chezmoi: Option<Chezmoi>,
|
chezmoi: Option<Chezmoi>,
|
||||||
|
|
||||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
|
||||||
mise: Option<Mise>,
|
|
||||||
|
|
||||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
||||||
yarn: Option<Yarn>,
|
yarn: Option<Yarn>,
|
||||||
|
|
||||||
@@ -729,7 +713,7 @@ impl ConfigFile {
|
|||||||
// TODO: i18n of clap currently not easily possible. Waiting for https://github.com/clap-rs/clap/issues/380
|
// TODO: i18n of clap currently not easily possible. Waiting for https://github.com/clap-rs/clap/issues/380
|
||||||
// Tracking issue for i18n: https://github.com/topgrade-rs/topgrade/issues/859
|
// Tracking issue for i18n: https://github.com/topgrade-rs/topgrade/issues/859
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(name = "topgrade", version, styles = clap_cargo::style::CLAP_STYLING)]
|
#[command(name = "topgrade", version)]
|
||||||
pub struct CommandLineArgs {
|
pub struct CommandLineArgs {
|
||||||
/// Edit the configuration file
|
/// Edit the configuration file
|
||||||
#[arg(long = "edit-config")]
|
#[arg(long = "edit-config")]
|
||||||
@@ -971,16 +955,7 @@ impl Config {
|
|||||||
.containers
|
.containers
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|containers| containers.runtime)
|
.and_then(|containers| containers.runtime)
|
||||||
.unwrap_or_default()
|
.unwrap_or(ContainerRuntime::Docker) // defaults to a popular choice
|
||||||
}
|
|
||||||
|
|
||||||
/// Whether to run system prune for containers.
|
|
||||||
pub fn containers_system_prune(&self) -> bool {
|
|
||||||
self.config_file
|
|
||||||
.containers
|
|
||||||
.as_ref()
|
|
||||||
.and_then(|containers| containers.system_prune)
|
|
||||||
.unwrap_or(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Tell whether the specified step should run.
|
/// Tell whether the specified step should run.
|
||||||
@@ -1052,7 +1027,7 @@ impl Config {
|
|||||||
.misc
|
.misc
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|misc| misc.tmux_session_mode)
|
.and_then(|misc| misc.tmux_session_mode)
|
||||||
.unwrap_or_default()
|
.unwrap_or(TmuxSessionMode::AttachIfNotInSession)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Tell whether we should perform cleanup steps.
|
/// Tell whether we should perform cleanup steps.
|
||||||
@@ -1306,7 +1281,7 @@ impl Config {
|
|||||||
.vim
|
.vim
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|c| c.force_plug_update)
|
.and_then(|c| c.force_plug_update)
|
||||||
.unwrap_or(false)
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to send a desktop notification at the beginning of every step
|
/// Whether to send a desktop notification at the beginning of every step
|
||||||
@@ -1379,7 +1354,7 @@ impl Config {
|
|||||||
.linux
|
.linux
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|s| s.arch_package_manager)
|
.and_then(|s| s.arch_package_manager)
|
||||||
.unwrap_or_default()
|
.unwrap_or(ArchPackageManager::Autodetect)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Extra yay arguments
|
/// Extra yay arguments
|
||||||
@@ -1816,26 +1791,6 @@ impl Config {
|
|||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mise_bump(&self) -> bool {
|
|
||||||
self.config_file
|
|
||||||
.mise
|
|
||||||
.as_ref()
|
|
||||||
.and_then(|mise| mise.bump)
|
|
||||||
.unwrap_or(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn mise_jobs(&self) -> u32 {
|
|
||||||
self.config_file.mise.as_ref().and_then(|mise| mise.jobs).unwrap_or(4)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn mise_interactive(&self) -> bool {
|
|
||||||
self.config_file
|
|
||||||
.mise
|
|
||||||
.as_ref()
|
|
||||||
.and_then(|mise| mise.interactive)
|
|
||||||
.unwrap_or(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn vscode_profile(&self) -> Option<&str> {
|
pub fn vscode_profile(&self) -> Option<&str> {
|
||||||
let vscode_cfg = self.config_file.vscode.as_ref()?;
|
let vscode_cfg = self.config_file.vscode.as_ref()?;
|
||||||
let profile = vscode_cfg.profile.as_ref()?;
|
let profile = vscode_cfg.profile.as_ref()?;
|
||||||
@@ -1924,24 +1879,4 @@ mod test {
|
|||||||
config.opt = CommandLineArgs::parse_from(["topgrade", "--remote-host-limit", "other_hostname"]);
|
config.opt = CommandLineArgs::parse_from(["topgrade", "--remote-host-limit", "other_hostname"]);
|
||||||
assert!(!config.should_execute_remote(Ok("hostname".to_string()), "user@remote_hostname"));
|
assert!(!config.should_execute_remote(Ok("hostname".to_string()), "user@remote_hostname"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ensure that custom commands are stored in insertion order.
|
|
||||||
#[test]
|
|
||||||
fn test_custom_commands_order() {
|
|
||||||
let toml_str = r#"
|
|
||||||
[commands]
|
|
||||||
z = "cmd_z"
|
|
||||||
y = "cmd_y"
|
|
||||||
x = "cmd_x"
|
|
||||||
"#;
|
|
||||||
let order: Vec<_> = toml::from_str::<ConfigFile>(toml_str)
|
|
||||||
.expect("toml parse error")
|
|
||||||
.commands
|
|
||||||
.expect("commands field missing")
|
|
||||||
.keys()
|
|
||||||
.cloned()
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
assert_eq!(order, vec!["z", "y", "x"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ impl Step {
|
|||||||
Bin => runner.execute(*self, "bin", || generic::bin_update(ctx))?,
|
Bin => runner.execute(*self, "bin", || generic::bin_update(ctx))?,
|
||||||
Bob => runner.execute(*self, "Bob", || generic::run_bob(ctx))?,
|
Bob => runner.execute(*self, "Bob", || generic::run_bob(ctx))?,
|
||||||
BrewCask => {
|
BrewCask => {
|
||||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
#[cfg(target_os = "macos")]
|
||||||
runner.execute(*self, "Brew Cask", || unix::run_brew_cask(ctx, unix::BrewVariant::Path))?;
|
runner.execute(*self, "Brew Cask", || unix::run_brew_cask(ctx, unix::BrewVariant::Path))?;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
runner.execute(*self, "Brew Cask (Intel)", || {
|
runner.execute(*self, "Brew Cask (Intel)", || {
|
||||||
@@ -750,7 +750,6 @@ pub(crate) fn default_steps() -> Vec<Step> {
|
|||||||
Restarts,
|
Restarts,
|
||||||
Flatpak,
|
Flatpak,
|
||||||
BrewFormula,
|
BrewFormula,
|
||||||
BrewCask,
|
|
||||||
Lure,
|
Lure,
|
||||||
Waydroid,
|
Waydroid,
|
||||||
AutoCpufreq,
|
AutoCpufreq,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use tracing::{debug, error, warn};
|
|||||||
use wildmatch::WildMatch;
|
use wildmatch::WildMatch;
|
||||||
|
|
||||||
use crate::command::CommandExt;
|
use crate::command::CommandExt;
|
||||||
use crate::error::{SkipStep, TopgradeError};
|
use crate::error::{self, SkipStep, TopgradeError};
|
||||||
use crate::terminal::print_separator;
|
use crate::terminal::print_separator;
|
||||||
use crate::{execution_context::ExecutionContext, utils::require};
|
use crate::{execution_context::ExecutionContext, utils::require};
|
||||||
use rust_i18n::t;
|
use rust_i18n::t;
|
||||||
@@ -185,6 +185,7 @@ pub fn run_containers(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut success = true;
|
||||||
let containers =
|
let containers =
|
||||||
list_containers(&crt, ctx.config().containers_ignored_tags()).context("Failed to list Docker containers")?;
|
list_containers(&crt, ctx.config().containers_ignored_tags()).context("Failed to list Docker containers")?;
|
||||||
debug!("Containers to inspect: {:?}", containers);
|
debug!("Containers to inspect: {:?}", containers);
|
||||||
@@ -219,21 +220,22 @@ pub fn run_containers(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Err(e);
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.config().containers_system_prune() {
|
if ctx.config().cleanup() {
|
||||||
// Run system prune to clean up unused containers, networks, and build cache
|
|
||||||
ctx.execute(&crt)
|
|
||||||
.args(["system", "prune", "--force"])
|
|
||||||
.status_checked()?
|
|
||||||
// Only run `image prune` if we don't run `system prune`
|
|
||||||
} else if ctx.config().cleanup() {
|
|
||||||
// Remove dangling images
|
// Remove dangling images
|
||||||
debug!("Removing dangling images");
|
debug!("Removing dangling images");
|
||||||
ctx.execute(&crt).args(["image", "prune", "-f"]).status_checked()?
|
if let Err(e) = ctx.execute(&crt).args(["image", "prune", "-f"]).status_checked() {
|
||||||
|
error!("Removing dangling images failed: {}", e);
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
if success {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(eyre!(error::StepFailed))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,8 +78,6 @@ impl Distribution {
|
|||||||
Some("neon") => Distribution::KDENeon,
|
Some("neon") => Distribution::KDENeon,
|
||||||
Some("openmandriva") => Distribution::OpenMandriva,
|
Some("openmandriva") => Distribution::OpenMandriva,
|
||||||
Some("pclinuxos") => Distribution::PCLinuxOS,
|
Some("pclinuxos") => Distribution::PCLinuxOS,
|
||||||
Some(id) if id.starts_with("origami") => Distribution::FedoraImmutable,
|
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
if let Some(name) = name {
|
if let Some(name) = name {
|
||||||
if name.contains("Vanilla") {
|
if name.contains("Vanilla") {
|
||||||
@@ -1343,11 +1341,4 @@ mod tests {
|
|||||||
fn test_cachyos() {
|
fn test_cachyos() {
|
||||||
test_template(include_str!("os_release/cachyos"), Distribution::Arch);
|
test_template(include_str!("os_release/cachyos"), Distribution::Arch);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_origami() {
|
|
||||||
test_template(include_str!("os_release/origami"), Distribution::FedoraImmutable);
|
|
||||||
test_template(include_str!("os_release/origami-nvidia"), Distribution::FedoraImmutable);
|
|
||||||
test_template(include_str!("os_release/origami-test"), Distribution::FedoraImmutable);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
NAME="Origami Linux"
|
|
||||||
VERSION="43.20251117.0 (COSMIC Atomic)"
|
|
||||||
RELEASE_TYPE="stable"
|
|
||||||
ID="origami-linux"
|
|
||||||
VERSION_ID="43"
|
|
||||||
VERSION_CODENAME=""
|
|
||||||
PRETTY_NAME="Origami 折り紙"
|
|
||||||
ANSI_COLOR="0;38;2;60;110;180"
|
|
||||||
LOGO="fedora-logo-icon"
|
|
||||||
CPE_NAME="cpe:/o:fedoraproject:fedora:43"
|
|
||||||
DEFAULT_HOSTNAME="origami"
|
|
||||||
HOME_URL="https://origami.wf/"
|
|
||||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f43/"
|
|
||||||
SUPPORT_URL="https://ask.fedoraproject.org/"
|
|
||||||
BUG_REPORT_URL="https://gitlab.com/groups/origami-linux/-/issues"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT_VERSION="43"
|
|
||||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
|
||||||
REDHAT_SUPPORT_PRODUCT_VERSION="43"
|
|
||||||
SUPPORT_END="2026-12-02"
|
|
||||||
VARIANT="COSMIC Atomic"
|
|
||||||
VARIANT_ID="cosmic-atomic"
|
|
||||||
OSTREE_VERSION="43.20251117.0"
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
NAME="Origami Linux Nvidia"
|
|
||||||
VERSION="43.20251117.0 (COSMIC Atomic)"
|
|
||||||
RELEASE_TYPE="stable"
|
|
||||||
ID="origami-linux-nvidia"
|
|
||||||
VERSION_ID="43"
|
|
||||||
VERSION_CODENAME=""
|
|
||||||
PRETTY_NAME="Origami 折り紙"
|
|
||||||
ANSI_COLOR="0;38;2;60;110;180"
|
|
||||||
LOGO="fedora-logo-icon"
|
|
||||||
CPE_NAME="cpe:/o:fedoraproject:fedora:43"
|
|
||||||
DEFAULT_HOSTNAME="origami"
|
|
||||||
HOME_URL="https://origami.wf/"
|
|
||||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f43/"
|
|
||||||
SUPPORT_URL="https://ask.fedoraproject.org/"
|
|
||||||
BUG_REPORT_URL="https://gitlab.com/groups/origami-linux/-/issues"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT_VERSION="43"
|
|
||||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
|
||||||
REDHAT_SUPPORT_PRODUCT_VERSION="43"
|
|
||||||
SUPPORT_END="2026-12-02"
|
|
||||||
VARIANT="COSMIC Atomic"
|
|
||||||
VARIANT_ID="cosmic-atomic"
|
|
||||||
OSTREE_VERSION="43.20251117.0"
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
NAME="Origami Linux Test"
|
|
||||||
VERSION="43.20251117.0 (COSMIC Atomic)"
|
|
||||||
RELEASE_TYPE="stable"
|
|
||||||
ID="origami-linux-test"
|
|
||||||
VERSION_ID="43"
|
|
||||||
VERSION_CODENAME=""
|
|
||||||
PRETTY_NAME="Origami 折り紙"
|
|
||||||
ANSI_COLOR="0;38;2;60;110;180"
|
|
||||||
LOGO="fedora-logo-icon"
|
|
||||||
CPE_NAME="cpe:/o:fedoraproject:fedora:43"
|
|
||||||
DEFAULT_HOSTNAME="origami"
|
|
||||||
HOME_URL="https://origami.wf/"
|
|
||||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f43/"
|
|
||||||
SUPPORT_URL="https://ask.fedoraproject.org/"
|
|
||||||
BUG_REPORT_URL="https://gitlab.com/groups/origami-linux/-/issues"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
|
||||||
REDHAT_BUGZILLA_PRODUCT_VERSION="43"
|
|
||||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
|
||||||
REDHAT_SUPPORT_PRODUCT_VERSION="43"
|
|
||||||
SUPPORT_END="2026-12-02"
|
|
||||||
VARIANT="COSMIC Atomic"
|
|
||||||
VARIANT_ID="cosmic-atomic"
|
|
||||||
OSTREE_VERSION="43.20251117.0"
|
|
||||||
@@ -81,6 +81,7 @@ impl BrewVariant {
|
|||||||
/// Execute an "internal" brew command, i.e. one that should always be run
|
/// Execute an "internal" brew command, i.e. one that should always be run
|
||||||
/// even when dry-running. Basically just a wrapper around [`Command::new`]
|
/// even when dry-running. Basically just a wrapper around [`Command::new`]
|
||||||
/// that uses `arch` to run using the correct architecture if needed.
|
/// that uses `arch` to run using the correct architecture if needed.
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
fn execute_internal(self) -> Command {
|
fn execute_internal(self) -> Command {
|
||||||
match self {
|
match self {
|
||||||
BrewVariant::MacIntel if cfg!(target_arch = "aarch64") => {
|
BrewVariant::MacIntel if cfg!(target_arch = "aarch64") => {
|
||||||
@@ -364,48 +365,12 @@ pub fn run_brew_formula(ctx: &ExecutionContext, variant: BrewVariant) -> Result<
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn run_brew_cask(ctx: &ExecutionContext, variant: BrewVariant) -> Result<()> {
|
pub fn run_brew_cask(ctx: &ExecutionContext, variant: BrewVariant) -> Result<()> {
|
||||||
let binary_name = require(variant.binary_name())?;
|
let binary_name = require(variant.binary_name())?;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
if variant.is_path() && !BrewVariant::is_macos_custom(binary_name) {
|
if variant.is_path() && !BrewVariant::is_macos_custom(binary_name) {
|
||||||
return Err(SkipStep(t!("Not a custom brew for macOS").to_string()).into());
|
return Err(SkipStep(t!("Not a custom brew for macOS").to_string()).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
{
|
|
||||||
// Homebrew cask support was added in version 4.5.0
|
|
||||||
let version_output = Command::new(&binary_name).arg("--version").output_checked_utf8()?;
|
|
||||||
|
|
||||||
let version_line = version_output
|
|
||||||
.stdout
|
|
||||||
.lines()
|
|
||||||
.next()
|
|
||||||
.ok_or_else(|| eyre!(output_changed_message!("brew --version", "no output lines")))?;
|
|
||||||
|
|
||||||
let version_str = version_line.split_whitespace().nth(1).ok_or_else(|| {
|
|
||||||
eyre!(output_changed_message!(
|
|
||||||
"brew --version",
|
|
||||||
"Expected version after 'Homebrew'"
|
|
||||||
))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
let version = Version::parse(version_str)
|
|
||||||
.wrap_err_with(|| output_changed_message!("brew --version", "Invalid version"))?;
|
|
||||||
|
|
||||||
if version < Version::new(4, 5, 0) {
|
|
||||||
return Err(SkipStep(
|
|
||||||
t!(
|
|
||||||
"Homebrew cask support on Linux requires Homebrew 4.5.0 or later (found {version})",
|
|
||||||
version = version
|
|
||||||
)
|
|
||||||
.to_string(),
|
|
||||||
)
|
|
||||||
.into());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print_separator(format!("{} - Cask", variant.step_title()));
|
print_separator(format!("{} - Cask", variant.step_title()));
|
||||||
|
|
||||||
let cask_upgrade_exists = variant
|
let cask_upgrade_exists = variant
|
||||||
@@ -859,23 +824,7 @@ pub fn run_mise(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut cmd = ctx.execute(&mise);
|
ctx.execute(&mise).arg("upgrade").status_checked()
|
||||||
|
|
||||||
cmd.arg("upgrade");
|
|
||||||
|
|
||||||
if ctx.config().mise_interactive() {
|
|
||||||
cmd.arg("--interactive");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ctx.config().mise_bump() {
|
|
||||||
cmd.arg("--bump");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ctx.config().mise_jobs() != 4 {
|
|
||||||
cmd.args(["--jobs", &ctx.config().mise_jobs().to_string()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd.status_checked()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_home_manager(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_home_manager(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
|||||||
Reference in New Issue
Block a user