From 5ac82b5b5d9a27fa4d392d1594cdf8d093240404 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:07:13 +0000 Subject: [PATCH] hello_world 0.0.1 (new formula) --- Formula/h/hello_world.rb | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Formula/h/hello_world.rb diff --git a/Formula/h/hello_world.rb b/Formula/h/hello_world.rb new file mode 100644 index 00000000..f70daf3b --- /dev/null +++ b/Formula/h/hello_world.rb @@ -0,0 +1,50 @@ +class HelloWorld < Formula + HELLO_WORLD_EXECUTABLE = "hello-world".freeze + + desc "Simple program that outputs 'Hello, World!'" + homepage "https://app.lizardbyte.dev" + url "https://github.com/LizardByte/actions.git", + revision: "69a105870bcc82cd3f8afd4c47781864459a1e19" + version "0.0.1" + + bottle do + root_url "https://ghcr.io/v2/lizardbyte/homebrew" + rebuild 1 + sha256 arm64_tahoe: "0000000000000000000000000000000000000000000000000000000000000000" + sha256 arm64_sequoia: "0000000000000000000000000000000000000000000000000000000000000000" + sha256 arm64_sonoma: "0000000000000000000000000000000000000000000000000000000000000000" + sha256 x86_64_linux: "0000000000000000000000000000000000000000000000000000000000000000" + end + + def install + # create hello world sh file with echo command + (buildpath/HELLO_WORLD_EXECUTABLE).write <<~EOS + #!/bin/sh + echo "Hello, World!" + EOS + chmod "+x", buildpath/HELLO_WORLD_EXECUTABLE + + # install the hello-world file to the bin directory + bin.install HELLO_WORLD_EXECUTABLE + + puts "buildpath: #{buildpath}" + end + + test do + assert_equal "Hello, World!", shell_output("#{bin}/#{HELLO_WORLD_EXECUTABLE}").strip + + puts "testpath: #{testpath}" + + # test the env + if ENV["HOMEBREW_BUILDPATH"] + dummy_filename = "dummy.txt" + cd File.join(ENV["HOMEBREW_BUILDPATH"]) do + # create a dummy file + File.write(dummy_filename, "Hello, World!") + assert_path_exists dummy_filename + end + assert_path_exists File.join(ENV["HOMEBREW_BUILDPATH"], dummy_filename) + end + end +end +# Created from LizardByte/actions@69a105870bcc82cd3f8afd4c47781864459a1e19