Skip to content

Commit

Permalink
Install licenses depending conditionally
Browse files Browse the repository at this point in the history
Fixes: RE-718
  • Loading branch information
rail committed Oct 10, 2024
1 parent 9c3680d commit 6ee9463
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Formula/cockroach-sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class CockroachSql < Formula

def install
bin.install "cockroach-sql"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
end

test do
Expand Down
4 changes: 3 additions & 1 deletion Formula/cockroach.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class Cockroach < Formula

def install
bin.install "cockroach"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
on_intel do
lib.mkpath
mkdir "#{lib}/cockroach"
Expand Down
4 changes: 3 additions & 1 deletion Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class CockroachAT231 < Formula

def install
bin.install "cockroach"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
on_intel do
lib.mkpath
mkdir "#{lib}/cockroach"
Expand Down
4 changes: 3 additions & 1 deletion Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class CockroachAT232 < Formula

def install
bin.install "cockroach"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
on_intel do
lib.mkpath
mkdir "#{lib}/cockroach"
Expand Down
4 changes: 3 additions & 1 deletion Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class CockroachAT241 < Formula

def install
bin.install "cockroach"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
on_intel do
lib.mkpath
mkdir "#{lib}/cockroach"
Expand Down
4 changes: 3 additions & 1 deletion release/cockroach-sql-tmpl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class CockroachSql < Formula

def install
bin.install "cockroach-sql"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
end

test do
Expand Down
4 changes: 3 additions & 1 deletion release/cockroach-tmpl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class Cockroach{{ .ClassSuffix }} < Formula

def install
bin.install "cockroach"
prefix.install "LICENSE.txt", "THIRD-PARTY-NOTICES.txt"
prefix.install "LICENSE" if File.exist?("LICENSE")
prefix.install "LICENSE.txt" if File.exist?("LICENSE.txt")
prefix.install "THIRD-PARTY-NOTICES.txt"
on_intel do
lib.mkpath
mkdir "#{lib}/cockroach"
Expand Down

0 comments on commit 6ee9463

Please sign in to comment.