Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_graphql 1.4.3 #95

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions Formula/pg_graphql.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class PgGraphql < Formula
desc "GraphQL support for PostgreSQL"
homepage "https://supabase.github.io/pg_graphql"
url "https://github.com/supabase/pg_graphql/archive/refs/tags/v1.4.2.tar.gz"
sha256 "fbd9be434577e85e788c023acc3e10bf0f4080a79fef5bb01a720ec83ad6937d"
url "https://github.com/supabase/pg_graphql/archive/refs/tags/v1.4.3.tar.gz"
sha256 "68e3f2bd81b1aeae4605181bb70b71bfcbc7194ab0c13945587467f0f353e6f2"
license "Apache-2.0"

bottle do
Expand All @@ -19,8 +19,8 @@ class PgGraphql < Formula
uses_from_macos "llvm" => :build

resource "pgrx" do
url "https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v0.10.2.tar.gz"
sha256 "040fd7195fc350ec7c823e7c2dcafad2cf621c8696fd2ce0db7626d7fbd3d877"
url "https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v0.11.2.tar.gz"
sha256 "2f818d18c86fa292428766c9af52313cd80030e041948d67716f7c4005e4ff38"
end

def neon_postgres
Expand Down Expand Up @@ -50,16 +50,13 @@ def install
system "cargo", "pgrx", "init", *args

pg_versions.each do |v|
# Ref https://github.com/postgres/postgres/commit/b55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a
dlsuffix = (OS.linux? || "v14 v15".include?(v)) ? "so" : "dylib"

system "cargo", "pgrx", "package", "--profile", "release",
"--pg-config", neon_postgres.pg_bin_for(v)/"pg_config",
"--out-dir", "stage-#{v}"

stage_dir = Pathname("stage-#{v}#{HOMEBREW_PREFIX}")
mkdir_p lib/neon_postgres.name/v
mv stage_dir/"lib/neon-postgres/#{v}/pg_graphql.#{dlsuffix}", lib/neon_postgres.name/v
mv stage_dir/"lib/neon-postgres/#{v}/pg_graphql.#{neon_postgres.dlsuffix(v)}", lib/neon_postgres.name/v

from_ext_dir = stage_dir/"share/neon-postgres/#{v}/extension"
to_ext_dir = share/neon_postgres.name/v/"extension"
Expand Down
Loading