nostr/build/tasks/main.yaml
changeset 219 0faea2a7570f
parent 217 e69a030975c4
child 224 25e44d8440d4
--- a/nostr/build/tasks/main.yaml	Sat Jul 22 23:27:09 2023 -0500
+++ b/nostr/build/tasks/main.yaml	Sun Jul 23 11:08:34 2023 -0500
@@ -11,6 +11,27 @@
     dest: "/tmp/"
     creates: "{{relayer_build_dir}}"
 
+# update name
+- name: update relayer nip11 info
+  lineinfile:
+    path: "{{relayer_main_src}}"
+    regexp: "^(\\s*)return \"WhitelistedRelay\"$"
+    line: "\\1return \"{{relayer_name}}\""
+    backrefs: yes
+
+# update nip11 relay info
+- name: update relayer nip11 info
+  lineinfile:
+    path: "{{relayer_handler_src}}"
+    regexp: "^(\\s*){{item.k}}(\\s*)(.*)$"
+    line: "\\1{{item.k}}\\2\"{{item.v}}\","
+    backrefs: yes
+  loop:
+    - {"k": "Description:", "v": "{{relayer_description}}"}
+    - {"k": "PubKey:", "v": "{{relayer_admin_pubkey}}"}
+    - {"k": "Contact:", "v": "{{relayer_admin_contact}}"}
+    - {"k": "Version:", "v": "{{relayer_version}}"}
+
 - name: check if relayer build exists
   stat:
     path: "{{relayer_build_dir}}/whitelisted/whitelisted"