]> _ Git - alire.git/commit
feat: self-update command (#1963)
authorCésar Sagaert <aldantanneo@gmail.com>
Mon, 14 Jul 2025 12:14:03 +0000 (14:14 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Jul 2025 12:14:03 +0000 (14:14 +0200)
commit2f9767bbfc2ea807a9eed44d7f2c2df047cac6f0
treee4b2e1da366f67a81b974cee863cd508f0fb6020
parentdb68323e541e79ed31fa5c737425ca7057192758
feat: self-update command (#1963)

* feat: function to get the latest alire release tag

* fix: fail downloads on http errors

* feat: self-update command

* style: program box

* fix: default to nightly update when 'dev' prerelease is detected

* extract install step in procedure, various fixes

* fix: better reporting

* fix: abort without error when the latest version is already installed

* check that release and artifact exist before downloading

* feat: find running executable with the resources crate

* small fixes

* add success message

* move tmp dir handling

* very ugly windows hacks

* fix CI

* address most comments

* minimum version for self-update feature

* function to recreate alr global switches

* use Non_Blocking_Spawn instead of `cmd /C start ...` in windows cleanup

* group install error handling

* clean up windows relaunch

* use alire features for version check

* logging improvements

* move switches names to constants

* some tests maybe

* ... curl doesn't set com.apple.quarantine.

That's only needed for browser downloads

* test debugging

* changelog

* address comments
25 files changed:
.github/workflows/ci-docker.yml
.github/workflows/ci-release.yml
.github/workflows/ci-toolchain.yml
.github/workflows/ci-unsupported.yml
.github/workflows/tarball-full.yml
.gitmodules
alire.toml
alr.gpr
alr_env.gpr
deps/resources [new submodule]
doc/user-changes.md
src/alire/alire-features.ads
src/alire/alire-github.adb
src/alire/alire-github.ads
src/alire/alire-os_lib-download.adb
src/alire/alire-os_lib-download.ads
src/alire/alire-spawn.adb
src/alire/alire-spawn.ads
src/alr/alr-commands-self_update.adb [new file with mode: 0644]
src/alr/alr-commands-self_update.ads [new file with mode: 0644]
src/alr/alr-commands.adb
testsuite/tests/self_update/latest/test.py [new file with mode: 0644]
testsuite/tests/self_update/latest/test.yaml [new file with mode: 0644]
testsuite/tests/self_update/specific_version/test.py [new file with mode: 0644]
testsuite/tests/self_update/specific_version/test.yaml [new file with mode: 0644]