From f855e5dce3a4f36d10378d1f347584c56798b324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Jakub=20Nani=C5=A1ta?= Date: Mon, 22 Jan 2024 09:46:35 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20toolbox-foundry=20build=20fixes?= =?UTF-8?q?=20(#231)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/dull-rules-look.md | 5 ++++ packages/toolbox-foundry/Makefile | 44 ++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 .changeset/dull-rules-look.md diff --git a/.changeset/dull-rules-look.md b/.changeset/dull-rules-look.md new file mode 100644 index 000000000..2efc1d630 --- /dev/null +++ b/.changeset/dull-rules-look.md @@ -0,0 +1,5 @@ +--- +"@layerzerolabs/toolbox-foundry": patch +--- + +Fix build diff --git a/packages/toolbox-foundry/Makefile b/packages/toolbox-foundry/Makefile index cb636b13a..43d1983c2 100644 --- a/packages/toolbox-foundry/Makefile +++ b/packages/toolbox-foundry/Makefile @@ -10,22 +10,42 @@ lib: clean node_modules git_submodules # This target will get all the libraries from node_modules # and copy them to the lib/ directory node_modules: - # First we create the parent directory - mkdir -p lib/solidity-bytes-utils/src + # First we make sure the target directory exists + mkdir -p lib/solidity-bytes-utils - # We copy the contracts from solidity-bytes-utils - # - # FIXME Due to a weird discrepancy between foundry compilation step - # and forge test, we need to provide the contracts in both src and contracts directories - cp -R node_modules/solidity-bytes-utils/contracts lib/solidity-bytes-utils/src - cp -R node_modules/solidity-bytes-utils/contracts lib/solidity-bytes-utils - - # We also want to make sure to include the license & package.json - cp node_modules/solidity-bytes-utils/package.json node_modules/solidity-bytes-utils/LICENSE lib/solidity-bytes-utils + # We copy the contracts + cp -R node_modules/solidity-bytes-utils/contracts/ lib/solidity-bytes-utils/ + + # And we include the licenses & package.json + cp node_modules/solidity-bytes-utils/package.json node_modules/solidity-bytes-utils/LICENSE* lib/solidity-bytes-utils # This target will get all the git submodules installed in src/ directory # and copy them to lib/ directory # # At this point we only have submodules in src/ so we can just copy everything git_submodules: - cp -R src/* lib + # + # ds-test + # + + # First we make sure the target directory exists + mkdir -p lib/ds-test + + # We copy the contracts + cp -R src/ds-test/src/ lib/ds-test/ + + # And we include the licenses & package.json + cp src/ds-test/package.json src/ds-test/LICENSE lib/ds-test/ + + # + # forge-std + # + + # First we make sure the target directory exists + mkdir -p lib/forge-std + + # We copy the contracts + cp -R src/forge-std/src/ lib/forge-std/ + + # And we include the licenses & package.json + cp src/forge-std/package.json src/forge-std/LICENSE* lib/forge-std/