From 0725b03aeee924e24eb94afb92cba7ba63b55d29 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Sat, 14 Nov 2026 14:01:38 +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..25998912 --- /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: "8c91b45b544512ba11dfbb95ec42960a20035ef5" + 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@8c91b45b544512ba11dfbb95ec42960a20035ef5