Skip to content

Commit

Permalink
redis@6.2 6.2.7 (new formula)
Browse files Browse the repository at this point in the history
Closes #102258.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
  • Loading branch information
JamieEdge authored and BrewTestBot committed Jun 14, 2022
1 parent 043074e commit 7afa69f
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Formula/redis@6.2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
class RedisAT62 < Formula
desc "Persistent key-value database, with built-in net interface"
homepage "https://redis.io/"
url "https://download.redis.io/releases/redis-6.2.7.tar.gz"
sha256 "b7a79cc3b46d3c6eb52fa37dde34a4a60824079ebdfb3abfbbfa035947c55319"
license "BSD-3-Clause"

livecheck do
url "https://download.redis.io/releases/"
regex(/href=.*?redis[._-]v?(6\.2(?:\.\d+)+)\.t/i)
end

keg_only :versioned_formula

disable! date: "2023-05-27", because: :deprecated_upstream

depends_on "openssl@3"

def install
system "make", "install", "PREFIX=#{prefix}", "CC=#{ENV.cc}", "BUILD_TLS=yes"

%w[run db/redis log].each { |p| (var/p).mkpath }

# Fix up default conf file to match our paths
inreplace "redis.conf" do |s|
s.gsub! "/var/run/redis.pid", var/"run/redis.pid"
s.gsub! "dir ./", "dir #{var}/db/redis/"
s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1")
end

etc.install "redis.conf"
etc.install "sentinel.conf" => "redis-sentinel.conf"
end

service do
run [opt_bin/"redis-server", etc/"redis.conf"]
keep_alive true
error_log_path var/"log/redis.log"
log_path var/"log/redis.log"
working_dir var
end

test do
system bin/"redis-server", "--test-memory", "2"
%w[run db/redis log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" }
end
end

0 comments on commit 7afa69f

Please sign in to comment.