Compare commits

...

13 Commits

Author SHA1 Message Date
github-actions[bot]
266adabd13 chore: release v16.1.2 (#1400)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-01 19:18:37 +01:00
Gideon
7d2e43f83b fix(release): Fix cross-compilation for arm requiring glibc>=2.39 (#1405) 2025-11-01 19:15:54 +01:00
Gideon
294a90a7c3 fix(release): Fix FreeBSD build (#1404) 2025-11-01 16:43:22 +01:00
Gideon
af5def1551 chore(release): Fix cross trying to fmt (#1403) 2025-11-01 16:30:56 +01:00
Gideon
8c63ee6a18 fix(release): Fix FreeBSD build (#1402) 2025-11-01 16:22:00 +01:00
Gideon
ee8ae8623d fix(release): Fix manual workflow trigger (#1401) 2025-11-01 16:19:31 +01:00
Gideon
222e6b55c0 fix(release): Fix FreeBSD build and add manual workflow trigger (#1399) 2025-11-01 16:03:15 +01:00
github-actions[bot]
2050a80665 chore: release v16.1.1 (#1392)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-01 15:12:40 +01:00
Gideon
e01be14041 fix(typst): Skip typst when self-update is disabled (#1397) 2025-11-01 14:53:26 +01:00
Gideon
dd6bc580fa fix(release): Fix winget release workflow (#1395) 2025-11-01 12:18:38 +01:00
Gideon
22ef36a185 chore: Update from deprecated macos-13 to macos-15-intel (#1394) 2025-11-01 12:04:53 +01:00
Gideon
b57ceccbe1 fix(release): Fix FreeBSD release (#1393) 2025-11-01 11:25:02 +01:00
Gideon
e9d430a4e4 fix(release): Fix FreeBSD release (#1391) 2025-11-01 11:22:24 +01:00
7 changed files with 99 additions and 17 deletions

View File

@@ -108,7 +108,7 @@ jobs:
- target: x86_64-apple-darwin
target_name: macOS-x86_64
os: macos-13
os: macos-15-intel
- target: aarch64-apple-darwin
target_name: macOS-aarch64

View File

@@ -23,7 +23,7 @@ jobs:
# Use the Ubuntu 22.04 image to link with a low version of glibc
#
# https://github.com/topgrade-rs/topgrade/issues/1095
platform: [ ubuntu-22.04, macos-latest, macos-13, windows-latest ]
platform: [ ubuntu-22.04, macos-latest, macos-15-intel, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v5.0.0
@@ -151,7 +151,10 @@ jobs:
"aarch64-unknown-linux-musl",
"x86_64-unknown-freebsd",
]
runs-on: ubuntu-latest
# Run this one on an older version as well, to limit glibc to 2.34 instead of 2.39.
# Even though this is cross-compiled, it links to the libc6-<arch>-cross installed on the host
# (see the apt-get install calls below)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5.0.0
@@ -179,12 +182,8 @@ jobs:
run: rustup target add ${{ matrix.target }}
- name: install cross
uses: taiki-e/install-action@c5b1b6f479c32f356cc6f4ba672a47f63853b13b # v2.62.38
with:
tool: cross@0.2.5
- name: Check format
run: cross fmt --all -- --check
# Install from source to fix `ld: cannot find -lgeom` for freebsd build
run: cargo +stable install --git https://github.com/cross-rs/cross cross
- name: Run clippy
run: cross clippy --all-targets --locked --target ${{matrix.target}} -- -D warnings
@@ -194,6 +193,15 @@ jobs:
- name: Run tests
run: cross test --target ${{matrix.target}}
# Running tests on FreeBSD is impossible; see https://github.com/cross-rs/cross/wiki/FAQ#running-bsd-tests
# Not that this is *NOT* the same as the original issue with `ld: cannot find -lgeom`, but a new issue:
# error: test failed, to rerun pass `--lib`
# Caused by:
# could not execute process `/target/x86_64-unknown-freebsd/debug/deps/topgrade-9b1670d87ca863dd` (never executed)
# Caused by:
# No such file or directory (os error 2)
# TODO: I have not tested this in GHA yet, only locally
if: ${{ matrix.target != 'x86_64-unknown-freebsd' }}
# Used `https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml`
# as a reference.

View File

@@ -13,6 +13,7 @@ jobs:
steps:
- uses: vedantmgoyal2009/winget-releaser@19e706d4c9121098010096f9c495a70a7518b30f # main
with:
release-tag: ${{ github.event.client_payload.tag }}
identifier: topgrade-rs.topgrade
max-versions-to-keep: 5 # keep only latest 5 versions
token: ${{ secrets.WINGET_TOKEN }}

View File

@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [16.1.2](https://github.com/topgrade-rs/topgrade/compare/v16.1.1...v16.1.2) - 2025-11-01
### Fixed
- *(release)* Fix cross-compilation for arm requiring glibc>=2.39 ([#1405](https://github.com/topgrade-rs/topgrade/pull/1405))
- *(release)* Fix FreeBSD build ([#1404](https://github.com/topgrade-rs/topgrade/pull/1404))
- *(release)* Fix FreeBSD build ([#1402](https://github.com/topgrade-rs/topgrade/pull/1402))
- *(release)* Fix manual workflow trigger ([#1401](https://github.com/topgrade-rs/topgrade/pull/1401))
- *(release)* Fix FreeBSD build and add manual workflow trigger ([#1399](https://github.com/topgrade-rs/topgrade/pull/1399))
### Other
- *(release)* Fix cross trying to fmt ([#1403](https://github.com/topgrade-rs/topgrade/pull/1403))
## [16.1.1](https://github.com/topgrade-rs/topgrade/compare/v16.1.0...v16.1.1) - 2025-11-01
### Fixed
- *(typst)* Skip typst when self-update is disabled ([#1397](https://github.com/topgrade-rs/topgrade/pull/1397))
- *(release)* Fix winget release workflow ([#1395](https://github.com/topgrade-rs/topgrade/pull/1395))
- *(release)* Fix FreeBSD release ([#1393](https://github.com/topgrade-rs/topgrade/pull/1393))
- *(release)* Fix FreeBSD release ([#1391](https://github.com/topgrade-rs/topgrade/pull/1391))
### Other
- Update from deprecated macos-13 to macos-15-intel ([#1394](https://github.com/topgrade-rs/topgrade/pull/1394))
## [16.1.0](https://github.com/topgrade-rs/topgrade/compare/v16.0.4...v16.1.0) - 2025-10-31
### Added

27
Cargo.lock generated
View File

@@ -2347,18 +2347,28 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
version = "1.0.203"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.203"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
@@ -2367,13 +2377,15 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.117"
version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
"serde_core",
]
[[package]]
@@ -2878,7 +2890,7 @@ dependencies = [
[[package]]
name = "topgrade"
version = "16.1.0"
version = "16.1.2"
dependencies = [
"cfg-if",
"chrono",
@@ -2905,6 +2917,7 @@ dependencies = [
"self_update",
"semver",
"serde",
"serde_json",
"shell-words",
"shellexpand",
"strum",

View File

@@ -6,7 +6,7 @@ keywords = ["upgrade", "update"]
license = "GPL-3.0"
repository = "https://github.com/topgrade-rs/topgrade"
rust-version = "1.84.1"
version = "16.1.0"
version = "16.1.2"
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
exclude = ["doc/screenshot.gif", "BREAKINGCHANGES_dev.md"]
edition = "2021"
@@ -54,6 +54,7 @@ rust-i18n = "3.0.1"
sys-locale = "0.3.1"
jetbrains-toolbox-updater = "5.0.0"
indexmap = { version = "2.9.0", features = ["serde"] }
serde_json = "1.0.145"
[package.metadata.generate-rpm]
assets = [{ source = "target/release/topgrade", dest = "/usr/bin/topgrade" }]

View File

@@ -5,6 +5,7 @@ use jetbrains_toolbox_updater::{find_jetbrains_toolbox, update_jetbrains_toolbox
use regex::bytes::Regex;
use rust_i18n::t;
use semver::Version;
use serde::Deserialize;
use std::ffi::OsString;
use std::iter::once;
use std::path::PathBuf;
@@ -1779,9 +1780,40 @@ pub fn run_yazi(ctx: &ExecutionContext) -> Result<()> {
ctx.execute(ya).args(["pkg", "upgrade"]).status_checked()
}
#[derive(Deserialize)]
struct TypstInfo {
build: TypstBuild,
}
#[derive(Deserialize)]
struct TypstBuild {
settings: TypstSettings,
}
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
struct TypstSettings {
self_update: bool,
}
pub fn run_typst(ctx: &ExecutionContext) -> Result<()> {
let typst = require("typst")?;
let raw_info = ctx
.execute(&typst)
.args(["info", "-f", "json"])
.output_checked_utf8()?
.stdout;
let info: TypstInfo = serde_json::from_str(&raw_info).wrap_err_with(|| {
output_changed_message!(
"typst info -f json",
"json output invalid or does not contain .build.settings.self-update"
)
})?;
if !info.build.settings.self_update {
return Err(SkipStep("This build of typst does not have self-update enabled".to_string()).into());
}
print_separator("Typst");
ctx.execute(typst).args(["update"]).status_checked()