From 364f41aea7d2260505f7b833aa8f9e101432c6e1 Mon Sep 17 00:00:00 2001
From: Varik Matevosyan <varikmatevosyan@gmail.com>
Date: Sun, 20 Oct 2024 19:20:11 +0400
Subject: [PATCH] sync with main (#86)

* fix ENABLE_TELEMETRY env variable value for lantern

* fix rubocop

* update build command for new version of lantern

* update version
---
 config.rb                          | 6 +++---
 rhizome/lantern/bin/update_lantern | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config.rb b/config.rb
index d1db590da..099a23d5c 100644
--- a/config.rb
+++ b/config.rb
@@ -147,9 +147,9 @@ def self.e2e_test?
   # Lantern
   override :lantern_top_domain, "db.lantern.dev", string
   override :lantern_dns_email, "varik@lantern.dev", string
-  override :lantern_default_version, "0.3.1", string
-  override :lantern_extras_default_version, "0.2.3", string
-  override :lantern_minor_default_version, "2", string
+  override :lantern_default_version, "0.4.0", string
+  override :lantern_extras_default_version, "0.4.0", string
+  override :lantern_minor_default_version, "1", string
   override :lantern_backup_bucket, "walg-dev-backups"
   override :e2e_test, "0"
   override :backup_retention_days, 7, int
diff --git a/rhizome/lantern/bin/update_lantern b/rhizome/lantern/bin/update_lantern
index 3f50cc27a..00d4e476e 100755
--- a/rhizome/lantern/bin/update_lantern
+++ b/rhizome/lantern/bin/update_lantern
@@ -12,7 +12,7 @@ version_tag = "v#{$configure_hash["version"]}"
 r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp && rm -rf lantern || true'"
 r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp && git clone https://github.com/lanterndata/lantern.git --recursive'"
 r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp/lantern && git checkout #{version_tag}'"
-r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp/lantern && git submodule update --recursive && mkdir build'"
-r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp/lantern/build && cmake -DBUILD_FOR_DISTRIBUTING=YES -DMARCH_NATIVE=ON ..'"
-r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp/lantern/build && make install'"
+r "sudo docker exec -u root #{$container_name} bash -c 'cd /tmp/lantern && git submodule update --recursive'"
+r "sudo docker exec -u root #{$container_name} bash -c 'cmake -DBUILD_FOR_DISTRIBUTING=YES -DMARCH_NATIVE=ON -S /tmp/lantern/lantern_hnsw -B /tmp/lantern/lantern_hnsw/build'"
+r "sudo docker exec -u root #{$container_name} bash -c 'make -C /tmp/lantern/lantern_hnsw/build install -j'"
 r "sudo docker exec -u root #{$container_name} bash -c 'rm -rf /tmp/lantern'"