## BEGIN:contents of $0"
#!/usr/bin/env bash
set -x
echo "gnostr-remote-test file name: $0"
cat $0 || true
echo "--- System Information ---"
echo "Hostname: $(hostname)"
echo "OS/Kernel: $(uname -a)"
echo "CPU Model: $(grep -m 1 'model name' /proc/cpuinfo | cut -d: -f2 | sed 's/^[ \t]*//')"
echo "Total Memory: $(free -h | awk '/^Mem:/ {print $2}')"
echo "Current User: $(whoami)"
echo "Current Directory: $(pwd)"
echo "" # Blank line for separation
echo "--- Script Information ---"
echo "Script PID: $$"
echo "hello, gnostr-remote-test!"
export EVENT1=$(gnostr --nsec $(gnostr-sha256) -r wss://relay.nostr.band custom-event -k 30617 -c "" -t "a|30617" -t "d|gnostr" -t "name|gnostr" -t "description|a git+nostr workflow utilty" -t "web|git.gnostr.org" -t "clone|git.gnostr.org" -t "relays|wss://relay.damus.io, wss://relay.gnostr.org" -t "r|<earliest_unique_commit>" -t "maintainers|gnostr <admin@gnostr.org>" -t "t|this_is_a_test_PoC_of_adistributed_decentralized_CI_service" -t "weeble|$(gnostr-weeble)" -t "blockheight|$(gnostr-blockheight)" -t "wobble|$(gnostr-wobble)")
export EVENT1_ID=$(gnostr-bech32-to-any $EVENT1 | sed 's/Id: //g')
##export EVENT1_ID=$EVENT1
gnostr-fetch-by-id $EVENT1_ID
export EVENT2=$(gnostr --nsec $(gnostr-sha256) -r wss://relay.nostr.band custom-event -k 1 -c "#gnostr distributed/decentralized CI EVENT! REF:https://nostr.band/?q=$EVENT1_ID" -t "a|30617" -t "d|gnostr" -t "name|gnostr" -t "description|a git+nostr workflow utilty" -t "web|git.gnostr.org" -t "clone|git.gnostr.org" -t "relays|wss://relay.damus.io, wss://relay.gnostr.org" -t "r|<earliest_unique_commit>" -t "maintainers|gnostr <admin@gnostr.org>" -t "t|this_is_a_test_PoC_of_adistributed_decentralized_CI_service" -t "weeble|$(gnostr-weeble)" -t "blockheight|$(gnostr-blockheight)" -t "wobble|$(gnostr-wobble)")
export EVENT2_ID=$(gnostr-bech32-to-any $EVENT2 | sed 's/Id: //g')
gnostr-fetch-by-id $EVENT2_ID
gnostr --nsec $(gnostr-privkey-to-bech32 $(gnostr-sha256)) -r wss://relay.nostr.band react -e $EVENT1_ID -r $EVENT1_ID
gnostr --nsec $(gnostr-privkey-to-bech32 $(gnostr-sha256)) -r wss://relay.nostr.band react -e $EVENT2_ID -r $EVENT2_ID
##gnostr --nsec $(gnostr-privkey-to-bech32 $(gnostr-sha256)) -r wss://relay.nostr.band react -e $EVENT1_ID -r $EVENT2_ID
## a known event 8bd85322d47f896c1cc4b20887b08513a0c6065b997debe7f4e87cc949ee7686 to test
gnostr --nsec $(gnostr-sha256) -r wss://relay.nostr.band react -e 8bd85322d47f896c1cc4b20887b08513a0c6065b997debe7f4e87cc949ee7686 -r $EVENT1_ID
gnostr --nsec $(gnostr-sha256) -r wss://relay.nostr.band react -e 8bd85322d47f896c1cc4b20887b08513a0c6065b997debe7f4e87cc949ee7686 -r $EVENT2_ID
##gnostr --nsec $(gnostr-sha256) -r wss://relay.damus.io react -e $EVENT1_ID -r $EVENT2_ID
##gnostr --nsec $(gnostr-sha256) -r wss://relay.damus.io react -e $EVENT2_ID -r $EVENT1_ID
## END:contents of $0"