diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b750e740..c1a1aba1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,19 +42,19 @@ jobs: - name: setup binaries (Windows only) if: matrix.platform == 'windows-2019' run: | - cargo install --git https://github.com/holochain/lair lair_keystore --rev 092f33dcc49e62c253c0c746baec0df65c4e2fb5 + cargo install lair_keystore --version 0.1.3 $LkPath = Get-Command lair-keystore | Select-Object -ExpandProperty Definition Copy-Item $LkPath -Destination src-tauri/bins/lair-keystore-x86_64-pc-windows-msvc.exe - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5b5db5a252ab3a4dab4021a299aef77a6685c807 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 72ec17ea40cb3b4fcbbccc812394a959e47bb097 holochain $HcPath = Get-Command holochain | Select-Object -ExpandProperty Definition Copy-Item $HcPath -Destination src-tauri/bins/holochain-v0.0.127-x86_64-pc-windows-msvc.exe - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 29b88b418578ba5e86fdb3a89659bb2723d60ada holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 78997dfdcfbdd37c23aae579673ee6e366885b51 holochain $HcPath = Get-Command holochain | Select-Object -ExpandProperty Definition Copy-Item $HcPath -Destination src-tauri/bins/holochain-v0.0.132-x86_64-pc-windows-msvc.exe - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev d20bb79395985f2c63e19dd544e24412c1ac2212 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5ae2ea8cf58530f5abbc3f99521158a4ce5447d9 holochain $HcPath = Get-Command holochain | Select-Object -ExpandProperty Definition Copy-Item $HcPath -Destination src-tauri/bins/holochain-v0.0.136-x86_64-pc-windows-msvc.exe @@ -72,19 +72,19 @@ jobs: - name: setup binaries (macos only) if: matrix.platform == 'macos-10.15' run: | - cargo install --git https://github.com/holochain/lair lair_keystore --rev 092f33dcc49e62c253c0c746baec0df65c4e2fb5 + cargo install lair_keystore --version 0.1.3 LAIR_PATH=$(which lair-keystore) cp $LAIR_PATH src-tauri/bins/lair-keystore-x86_64-apple-darwin - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5b5db5a252ab3a4dab4021a299aef77a6685c807 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 72ec17ea40cb3b4fcbbccc812394a959e47bb097 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.127-x86_64-apple-darwin - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 29b88b418578ba5e86fdb3a89659bb2723d60ada holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 78997dfdcfbdd37c23aae579673ee6e366885b51 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.132-x86_64-apple-darwin - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev d20bb79395985f2c63e19dd544e24412c1ac2212 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5ae2ea8cf58530f5abbc3f99521158a4ce5447d9 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.136-x86_64-apple-darwin @@ -112,19 +112,19 @@ jobs: - name: setup binaries (ubuntu only) if: matrix.platform == 'ubuntu-18.04' run: | - cargo install --git https://github.com/holochain/lair lair_keystore --rev 092f33dcc49e62c253c0c746baec0df65c4e2fb5 + cargo install lair_keystore --version 0.1.3 LAIR_PATH=$(which lair-keystore) cp $LAIR_PATH src-tauri/bins/lair-keystore-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5b5db5a252ab3a4dab4021a299aef77a6685c807 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 72ec17ea40cb3b4fcbbccc812394a959e47bb097 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.127-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 29b88b418578ba5e86fdb3a89659bb2723d60ada holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 78997dfdcfbdd37c23aae579673ee6e366885b51 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.132-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev d20bb79395985f2c63e19dd544e24412c1ac2212 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5ae2ea8cf58530f5abbc3f99521158a4ce5447d9 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.136-x86_64-unknown-linux-gnu diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d9eaa243..97b2016b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,22 +39,22 @@ jobs: run: | mkdir src-tauri/bins - cargo install --git https://github.com/holochain/lair lair_keystore --rev 092f33dcc49e62c253c0c746baec0df65c4e2fb5 + cargo install lair_keystore --version 0.1.3 LAIR_PATH=$(which lair-keystore) cp $LAIR_PATH src-tauri/bins/lair-keystore-x86_64-unknown-linux-gnu CADDY_PATH=$(which caddy) cp $CADDY_PATH src-tauri/bins/caddy-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5b5db5a252ab3a4dab4021a299aef77a6685c807 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 72ec17ea40cb3b4fcbbccc812394a959e47bb097 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.127-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 29b88b418578ba5e86fdb3a89659bb2723d60ada holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 78997dfdcfbdd37c23aae579673ee6e366885b51 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.132-x86_64-unknown-linux-gnu - cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev d20bb79395985f2c63e19dd544e24412c1ac2212 holochain + cargo install --locked --git https://github.com/guillemcordoba/holochain.git --rev 5ae2ea8cf58530f5abbc3f99521158a4ce5447d9 holochain HOLOCHAIN_PATH=$(which holochain) cp $HOLOCHAIN_PATH src-tauri/bins/holochain-v0.0.136-x86_64-unknown-linux-gnu diff --git a/crates/holochain_manager/src/versions/version_manager.rs b/crates/holochain_manager/src/versions/version_manager.rs index 9adf2067..26e19d50 100644 --- a/crates/holochain_manager/src/versions/version_manager.rs +++ b/crates/holochain_manager/src/versions/version_manager.rs @@ -12,7 +12,7 @@ pub trait VersionManager { fn lair_keystore_version(&self) -> LairKeystoreVersion { // For now all holochain versions run the same lair keystore version - LairKeystoreVersion::V0_1_2 + LairKeystoreVersion::V0_1_3 } fn initial_config( diff --git a/crates/lair_keystore_manager/src/versions/mod.rs b/crates/lair_keystore_manager/src/versions/mod.rs index 419e3062..b949e823 100644 --- a/crates/lair_keystore_manager/src/versions/mod.rs +++ b/crates/lair_keystore_manager/src/versions/mod.rs @@ -2,12 +2,12 @@ use serde_enum_str::{Deserialize_enum_str, Serialize_enum_str}; mod init; mod launch; -pub mod v0_1_2; +pub mod v0_1_3; #[derive(Copy, Clone, Debug, PartialEq, Hash, Eq, Deserialize_enum_str, Serialize_enum_str)] pub enum LairKeystoreVersion { - #[serde(rename = "0.1.2")] - V0_1_2, + #[serde(rename = "0.1.3")] + V0_1_3, } impl Into for LairKeystoreVersion { diff --git a/crates/lair_keystore_manager/src/versions/v0_1_2.rs b/crates/lair_keystore_manager/src/versions/v0_1_3.rs similarity index 88% rename from crates/lair_keystore_manager/src/versions/v0_1_2.rs rename to crates/lair_keystore_manager/src/versions/v0_1_3.rs index 066919de..c16ee029 100644 --- a/crates/lair_keystore_manager/src/versions/v0_1_2.rs +++ b/crates/lair_keystore_manager/src/versions/v0_1_3.rs @@ -10,16 +10,16 @@ use super::{ }; use crate::{error::LairKeystoreError, utils::create_dir_if_necessary, LairKeystoreManager}; -pub struct LairKeystoreManagerV0_1_2 { +pub struct LairKeystoreManagerV0_1_3 { _keystore_path: PathBuf, connection_url: Url2, password: String, } #[async_trait] -impl LairKeystoreManager for LairKeystoreManagerV0_1_2 { +impl LairKeystoreManager for LairKeystoreManagerV0_1_3 { fn lair_keystore_version() -> LairKeystoreVersion { - LairKeystoreVersion::V0_1_2 + LairKeystoreVersion::V0_1_3 } fn is_initialized(keystore_path: PathBuf) -> bool { @@ -40,7 +40,7 @@ impl LairKeystoreManager for LairKeystoreManagerV0_1_2 { let connection_url = launch_lair_keystore_process(log_level, keystore_path.clone(), password.clone()).await?; - Ok(LairKeystoreManagerV0_1_2 { + Ok(LairKeystoreManagerV0_1_3 { password, connection_url, _keystore_path: keystore_path, diff --git a/src-tauri/src/launcher/manager.rs b/src-tauri/src/launcher/manager.rs index e3db1158..e2e01e77 100644 --- a/src-tauri/src/launcher/manager.rs +++ b/src-tauri/src/launcher/manager.rs @@ -3,7 +3,7 @@ use holochain_manager::error::LaunchHolochainError; use holochain_web_app_manager::error::LaunchWebAppManagerError; use lair_keystore_manager::error::{LairKeystoreError, LaunchChildError}; use lair_keystore_manager::utils::create_dir_if_necessary; -use lair_keystore_manager::versions::v0_1_2::LairKeystoreManagerV0_1_2; +use lair_keystore_manager::versions::v0_1_3::LairKeystoreManagerV0_1_3; use lair_keystore_manager::LairKeystoreManager; use serde::{Deserialize, Serialize}; use std::collections::HashMap; @@ -60,9 +60,9 @@ impl LauncherManager { create_dir_if_necessary(&root_holochain_data_path())?; create_dir_if_necessary(&root_config_path())?; - let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_2::lair_keystore_version()); + let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_3::lair_keystore_version()); - let is_initialized = LairKeystoreManagerV0_1_2::is_initialized(keystore_path); + let is_initialized = LairKeystoreManagerV0_1_3::is_initialized(keystore_path); let keystore_status = match is_initialized { true => KeystoreStatus::PasswordNecessary, @@ -98,9 +98,9 @@ impl LauncherManager { } pub async fn initialize_and_launch_keystore(&mut self, password: String) -> Result<(), String> { - let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_2::lair_keystore_version()); + let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_3::lair_keystore_version()); - LairKeystoreManagerV0_1_2::initialize(keystore_path, password.clone()) + LairKeystoreManagerV0_1_3::initialize(keystore_path, password.clone()) .await .map_err(|err| format!("Error initializing the keystore: {:?}", err))?; @@ -110,9 +110,9 @@ impl LauncherManager { } pub async fn launch_keystore(&mut self, password: String) -> Result<(), String> { - let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_2::lair_keystore_version()); + let keystore_path = keystore_data_path(LairKeystoreManagerV0_1_3::lair_keystore_version()); let lair_keystore_manager = - LairKeystoreManagerV0_1_2::launch(self.config.log_level, keystore_path, password.clone()) + LairKeystoreManagerV0_1_3::launch(self.config.log_level, keystore_path, password.clone()) .await .map_err(|err| format!("Error launching the keystore: {:?}", err))?;