From ada50b2f36a72799befa1637742a0c22e15dd4d2 Mon Sep 17 00:00:00 2001 From: Glydric Date: Tue, 2 Sep 2025 09:39:40 +0200 Subject: [PATCH] Made the base formulae dynamic on latest release, included the head option to download master --- Formula/quickemu.rb | 14 ++++++++++++-- Formula/quickemu_dev.rb | 37 ------------------------------------- 2 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 Formula/quickemu_dev.rb diff --git a/Formula/quickemu.rb b/Formula/quickemu.rb index 398a305..7e50600 100644 --- a/Formula/quickemu.rb +++ b/Formula/quickemu.rb @@ -1,8 +1,18 @@ class Quickemu < Formula desc "Quickly create and run optimised Windows, macOS and Linux virtual machines" homepage "https://github.com/quickemu-project/quickemu" - url "https://github.com/quickemu-project/quickemu/archive/refs/tags/4.9.7.tar.gz" - sha256 "38a93301a2b233bc458c62d1228d310a9c29c63c10d008c2905029ca66188606" + + livecheck do + url :stable + end + + stable do + latest_release = JSON.parse(Utils.safe_popen_read("curl", "-s", "https://api.github.com/repos/quickemu-project/quickemu/releases/latest")) + version latest_release["tag_name"] + url "https://api.github.com/repos/quickemu-project/quickemu/tarball/#{latest_release["tag_name"]}" + end + + head "https://github.com/quickemu-project/quickemu.git" license "MIT" depends_on "bash" diff --git a/Formula/quickemu_dev.rb b/Formula/quickemu_dev.rb deleted file mode 100644 index eb73e99..0000000 --- a/Formula/quickemu_dev.rb +++ /dev/null @@ -1,37 +0,0 @@ -class QuickemuDev < Formula - desc "Quickly create and run optimised Windows, macOS and Linux virtual machines" - homepage "https://github.com/quickemu-project/quickemu" - url "https://github.com/quickemu-project/quickemu/archive/refs/heads/master.tar.gz" - version "dev" - license "MIT" - - depends_on "bash" - depends_on "cdrtools" - depends_on "coreutils" - depends_on "jq" - depends_on "python3" - depends_on "qemu" - depends_on "samba" - depends_on "socat" - depends_on "swtpm" - depends_on "usbutils" - depends_on "zsync" - - def install - bin.install "quickemu" - bin.install "quickget" - end - - test do - # `test do` will create, run in and delete a temporary directory. - # - # This test will fail and we won't accept that! For Homebrew/homebrew-core - # this will need to be a test that verifies the functionality of the - # software. Run the test with `brew test quickemu`. Options passed - # to `brew install` such as `--HEAD` also need to be provided to `brew test`. - # - # The installed folder is not in the path, so use the entire path to any - # executables being tested: `system bin/"program", "do", "something"`. - system "false" - end -end