Skip to content

Commit fca1e4a

Browse files
committed
Update
1 parent b91b049 commit fca1e4a

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

_do.cr

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ def build
245245

246246
build_rust_app(
247247
MEDIA_HOST,
248+
alpine_distro_version: "edge",
248249
crate: "metasearch",
249250
branch: "large-images",
250251
git: URI.parse("https://github.com/alopatindev/metasearch2"),
252+
dependencies: ["clang21-libclang", "cmake", "make", "g++"],
251253
)
252254

253255
generate_certbot_script(MEDIA_HOST)
@@ -967,6 +969,7 @@ end
967969
def build_rust_app(
968970
host : String,
969971
*,
972+
alpine_distro_version : String | Nil = nil,
970973
crate : String,
971974
version : String | Nil = nil,
972975
git : URI | Nil = nil,
@@ -988,7 +991,7 @@ def build_rust_app(
988991
trace("building #{crate}\n")
989992
Dir.mkdir_p(bin_dir, 0o755)
990993

991-
distro_version = alpine_version(host)
994+
distro_version = alpine_distro_version || alpine_version(host)
992995
warn("alpine #{host} version #{distro_version} != alpine build version #{ALPINE_VERSION}") unless distro_version == ALPINE_VERSION
993996
target_cpu = TARGET_CPU[host]
994997

@@ -1426,15 +1429,9 @@ end
14261429

14271430
def follow(config, profiles : Set(String), profile_relays : Array(String))
14281431
nostr_config = config["theme_settings"]["nostr"]
1429-
# TODO: relays_from_config = nostr_config["relays"].as_a.map { |i| i.as_s }
1430-
relays_from_config = [] of String
1431-
relays = (File
1432-
.read_lines("_relays.txt")
1433-
.map { |i| i.strip } + relays_from_config)
1434-
.to_set
1435-
.reject { |i| i.empty? }
1436-
.map { |i| URI.parse(i).to_s } + profile_relays
1432+
relays = profile_relays + ["wss://sendit.nosflare.com", "wss://nostr.codonaft.com/publish"]
14371433
pk = decode_pk(nostr_config["npub"].as_s)[0]
1434+
puts("requesting follow list")
14381435

14391436
tags_and_created_at = `nak req -k 3 -a #{pk} #{relays.join(' ')}`
14401437
.split('\n')
@@ -1484,6 +1481,7 @@ def follow(config, profiles : Set(String), profile_relays : Array(String))
14841481
if (gets || "").strip == "y"
14851482
puts(nak_raw(["event"] + relays, new_event.to_json.split('\n')))
14861483
end
1484+
puts("finished")
14871485
end
14881486

14891487
def decode_pk(profile : String) : Array(String)
@@ -1517,6 +1515,7 @@ def decode_pk(profile : String) : Array(String)
15171515
end
15181516

15191517
def sign(unsigned_event : String, nostr)
1518+
puts("signing")
15201519
nak([
15211520
"event",
15221521
"--pow", nostr["min_read_pow"].to_s,

0 commit comments

Comments
 (0)