Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Issue initialzing with Foundry #4

Open
CarsonCase opened this issue Feb 13, 2023 · 1 comment
Open

Issue initialzing with Foundry #4

CarsonCase opened this issue Feb 13, 2023 · 1 comment

Comments

@CarsonCase
Copy link

Pretty new to Foundry so go easy on me here if I'm just missing something obvious.

But Foundry isn't initializing dependencies with this readme and not with forge install either. From what I can find in the forge documentation it should use the submodules to install dependancies in lib/ once forge install is called. And these are defined in .gitmodules. I can copy paste the data in there 1 by 1 and get it installed. But I imagine the issue here is that if you use forge init --force and you do need to use the force flag, then a new lib/ folder is created without the submodules even though they're defined in the root folder.

May need to publish the project post forge-init to be cloned with the submodules, or if that's too crowded include a script to

for module in submodules:
      forge install module.url
@duncan4123
Copy link

does this script help?

#!/bin/sh

set -e

git config -f .gitmodules --get-regexp '^submodule..*.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants