Skip to content

Commit

Permalink
fix submodule add command
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Sep 29, 2023
1 parent dd9b7c4 commit 59d3c01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/upgradeable/transpile-onto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ base="${2-}"
bash scripts/upgradeable/transpile.sh

commit="$(git rev-parse --short HEAD)"
branch="$(git rev-parse --abbrev-ref HEAD)"
start_branch="$(git rev-parse --abbrev-ref HEAD)"

git add contracts

Expand Down Expand Up @@ -43,10 +43,12 @@ fi

if [[ -v REMOTE ]]; then
lib=lib/openzeppelin-contracts
git submodule add -b "$branch" "$REMOTE" "$lib"
git submodule add -b "${base#origin/}" "$REMOTE" "$lib"
git -C "$lib" checkout "$commit"
git add "$lib"
fi

git commit -m "Transpile $commit"
git checkout "$branch"

# return to original branch
git checkout "$start_branch"

0 comments on commit 59d3c01

Please sign in to comment.