Skip to content

Commit 39a96bd

Browse files
committed
Problem: duplicate packages potentially imported from Pigsty
Solution: ensure we check github urls to avoid duplicates
1 parent 6adbe83 commit 39a96bd

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

packages/timescaledb.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/vector.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

pigsty.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
require "csv"
88
require "open-uri"
99

10+
Pgpm.load_packages
11+
1012
URI.open("https://raw.githubusercontent.com/pgsty/extension/refs/heads/main/data/pigsty.csv") do |f|
1113
i = 0
1214
CSV.foreach(f, headers: true) do |row|
@@ -20,6 +22,12 @@
2022
origin = "git \"#{origin}\""
2123
end
2224
name = row["name"]
25+
26+
next if Pgpm::Package.find do |pkg|
27+
origin =~ /github/ &&
28+
pkg.respond_to?(:github_config) && pkg.github_config&.name == github
29+
end
30+
2331
next if File.exist?("packages/#{name}.rb")
2432

2533
i += 1

0 commit comments

Comments
 (0)