-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(proto-build): move consts to a file
- Loading branch information
Showing
5 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
use std::path::Path; | ||
use crate::{ARCHWAY_DIR, ARCHWAY_REV, COSMOS_SDK_DIR, COSMOS_SDK_REV, IBC_DIR, IBC_REV, WASMD_DIR, WASMD_REV}; | ||
use crate::consts::{ARCHWAY_DIR, ARCHWAY_REV, COSMOS_SDK_DIR, COSMOS_SDK_REV, IBC_DIR, IBC_REV, WASMD_DIR, WASMD_REV}; | ||
use crate::utils::run::run_git; | ||
|
||
pub fn update_submodules(submodules_dir: &Path) { | ||
run_git(["submodule", "update", "--init"]).unwrap(); | ||
run_git(["submodule", "foreach", "git", "fetch"]).unwrap(); | ||
|
||
println!("Updating archway-network/archway submodule..."); | ||
let archway_dir = format!("{}/{}", submodules_dir.display(), ARCHWAY_DIR); | ||
run_git(["-C", archway_dir.as_str(), "reset", "--hard", ARCHWAY_REV]).unwrap(); | ||
let archway_dir = submodules_dir.join(ARCHWAY_DIR); | ||
run_git(["-C", archway_dir.to_str().unwrap(), "reset", "--hard", ARCHWAY_REV]).unwrap(); | ||
|
||
println!("Updating cosmos/cosmos-sdk submodule..."); | ||
let sdk_dir = format!("{}/{}", submodules_dir.display(), COSMOS_SDK_DIR); | ||
run_git(["-C", sdk_dir.as_str(), "reset", "--hard", COSMOS_SDK_REV]).unwrap(); | ||
let sdk_dir = submodules_dir.join(COSMOS_SDK_DIR); | ||
run_git(["-C", sdk_dir.to_str().unwrap(), "reset", "--hard", COSMOS_SDK_REV]).unwrap(); | ||
|
||
println!("Updating cosmos/ibc-go submodule..."); | ||
let ibc_dir = format!("{}/{}", submodules_dir.display(), IBC_DIR); | ||
run_git(["-C", ibc_dir.as_str(), "reset", "--hard", IBC_REV]).unwrap(); | ||
let ibc_dir = submodules_dir.join(IBC_DIR); | ||
run_git(["-C", ibc_dir.to_str().unwrap(), "reset", "--hard", IBC_REV]).unwrap(); | ||
|
||
println!("Updating wasmd submodule..."); | ||
let wasmd_dir = format!("{}/{}", submodules_dir.display(), WASMD_DIR); | ||
run_git(["-C", wasmd_dir.as_str(), "reset", "--hard", WASMD_REV]).unwrap(); | ||
let wasmd_dir = submodules_dir.join(WASMD_DIR); | ||
run_git(["-C", wasmd_dir.to_str().unwrap(), "reset", "--hard", WASMD_REV]).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// The Archway commit or tag to be cloned and used to build the proto files | ||
pub const ARCHWAY_REV: &str = "v7.0.1"; | ||
pub const ARCHWAY_DIR: &str = "archway"; | ||
|
||
/// The Cosmos SDK commit or tag to be cloned and used to build the proto files | ||
pub const COSMOS_SDK_REV: &str = "v0.47.11"; | ||
pub const COSMOS_SDK_DIR: &str = "cosmos-sdk"; | ||
|
||
/// The Cosmos ibc-go commit or tag to be cloned and used to build the proto files | ||
pub const IBC_REV: &str = "v7.4.0"; | ||
pub const IBC_DIR: &str = "ibc-go"; | ||
|
||
/// The wasmd commit or tag to be cloned and used to build the proto files | ||
pub const WASMD_REV: &str = "v0.45.0"; | ||
pub const WASMD_DIR: &str = "wasmd"; | ||
|
||
pub const PROTO_DIR: &str = "proto"; | ||
pub const OUT_DIR: &str = "packages/proto/src/gen"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters