diff --git a/.changeset/calm-eggs-bathe.md b/.changeset/calm-eggs-bathe.md new file mode 100644 index 0000000..d175172 --- /dev/null +++ b/.changeset/calm-eggs-bathe.md @@ -0,0 +1,5 @@ +--- +"eth-tech-tree": patch +--- + +intitial commit changes diff --git a/src/tasks/create-first-git-commit.ts b/src/tasks/create-first-git-commit.ts index 455c3d6..0800c67 100644 --- a/src/tasks/create-first-git-commit.ts +++ b/src/tasks/create-first-git-commit.ts @@ -5,18 +5,16 @@ const foundryLibraries = ["foundry-rs/forge-std", "OpenZeppelin/openzeppelin-con export async function createFirstGitCommit(targetDir: string) { try { - // Remove remote - await execa("git", ["remote", "remove", "origin"], { cwd: targetDir }); - // Add and commit all changes - await execa("git", ["add", "-A"], { cwd: targetDir }); - await execa("git", ["commit", "-m", "Initial commit with 🏗️ Scaffold-ETH 2", "--no-verify"], { cwd: targetDir }); const foundryWorkSpacePath = path.resolve(targetDir, "packages", "foundry"); // remove lib directory since it doesn't like directories to exist when installing await execa("rm",["-rf", "lib"], { cwd: foundryWorkSpacePath }); // forge install foundry libraries await execa("forge", ["install", ...foundryLibraries, "--no-commit"], { cwd: foundryWorkSpacePath }); + // Add and commit all changes await execa("git", ["add", "-A"], { cwd: targetDir }); - await execa("git", ["commit", "--amend", "--no-edit"], { cwd: targetDir }); + await execa("git", ["commit", "-m", "Initial commit with 🏗️ Scaffold-ETH 2", "--no-verify"], { cwd: targetDir }); + // Remove remote + await execa("git", ["remote", "remove", "origin"], { cwd: targetDir }); } catch (e: any) { // cast error as ExecaError to get stderr throw new Error("Failed to initialize git repository", {