mirror of
https://github.com/FuelLabs/sway.git
synced 2025-08-16 16:40:33 +00:00
Refactor manifest handling around forc-pkg
to accommodate workspace manifest files (#2894)
This commit is contained in:
parent
4e9a5ae61a
commit
c27135ffee
10 changed files with 164 additions and 60 deletions
|
@ -1,5 +1,5 @@
|
|||
use anyhow::{bail, Result};
|
||||
use forc_pkg::{BuildOptions, Compiled, ManifestFile};
|
||||
use forc_pkg::{BuildOptions, Compiled, PackageManifestFile};
|
||||
use fuel_crypto::Signature;
|
||||
use fuel_gql_client::client::FuelClient;
|
||||
use fuel_tx::{Output, Salt, StorageSlot, Transaction};
|
||||
|
@ -20,7 +20,7 @@ pub async fn deploy(command: DeployCommand) -> Result<fuel_tx::ContractId> {
|
|||
} else {
|
||||
std::env::current_dir()?
|
||||
};
|
||||
let manifest = ManifestFile::from_dir(&curr_dir)?;
|
||||
let manifest = PackageManifestFile::from_dir(&curr_dir)?;
|
||||
manifest.check_program_type(vec![TreeType::Contract])?;
|
||||
|
||||
let DeployCommand {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use anyhow::{anyhow, bail, Result};
|
||||
use forc_pkg::{fuel_core_not_running, BuildOptions, ManifestFile};
|
||||
use forc_pkg::{fuel_core_not_running, BuildOptions, PackageManifestFile};
|
||||
use fuel_crypto::Signature;
|
||||
use fuel_gql_client::client::FuelClient;
|
||||
use fuel_tx::{AssetId, Output, Transaction, Witness};
|
||||
|
@ -21,7 +21,7 @@ pub async fn run(command: RunCommand) -> Result<Vec<fuel_tx::Receipt>> {
|
|||
} else {
|
||||
std::env::current_dir().map_err(|e| anyhow!("{:?}", e))?
|
||||
};
|
||||
let manifest = ManifestFile::from_dir(&path_dir)?;
|
||||
let manifest = PackageManifestFile::from_dir(&path_dir)?;
|
||||
manifest.check_program_type(vec![TreeType::Script])?;
|
||||
|
||||
let input_data = &command.data.unwrap_or_else(|| "".into());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue