Skip to content

Commit

Permalink
🚧 Fix toolbox-foundry build (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Jan 25, 2024
1 parent bdbc09a commit 0fad088
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-rats-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/toolbox-foundry": patch
---

Fix inconsistent build behavior on GNU and BSD systems
12 changes: 10 additions & 2 deletions packages/toolbox-foundry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ git_submodules:
mkdir -p lib/ds-test

# We copy the contracts
cp -R src/ds-test/src/ lib/ds-test/
#
# The . at the end is important since GNU and BSD
# have a different implementation of the cp command
#
# Without the ., the command has different behavior on BSD (local, macOSX) and GNU (remote, CI/CD):
#
# - on BSD, it will copy the contents of src folder into ds-test
# - on GNU, it will copy the src folder into ds-test
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/
Expand All @@ -49,7 +57,7 @@ git_submodules:
mkdir -p lib/forge-std

# We copy the contracts
cp -R src/forge-std/src/ lib/forge-std/
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/

0 comments on commit 0fad088

Please sign in to comment.