Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Feb 2, 2024
1 parent 2484d3b commit 2c987b9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bridges/snowbridge/scripts/contribute-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ set -eux
# let's avoid any restrictions on where this script can be called for - snowbridge repo may be
# plugged into any other repo folder. So the script (and other stuff that needs to be removed)
# may be located either in call dir, or one of it subdirs.
SNOWBRIDGE_FOLDER="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
SNOWBRIDGE_FOLDER="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../"

# Get the current Git branch name
current_branch=$(git rev-parse --abbrev-ref HEAD)

if [ "$current_branch" = "$branch_name" ]; then
echo "Already on requested branch, not creating."
if [ "$current_branch" = "$branch_name" ] || git branch | grep -q "$branch_name"; then
echo "Already on requested branch or branch exists, not creating."
else
git branch "$branch_name"
fi
Expand Down Expand Up @@ -69,7 +69,8 @@ pushd $SNOWBRIDGE_FOLDER
rm -f $SNOWBRIDGE_FOLDER/parachain/Cargo.toml
rm -f $SNOWBRIDGE_FOLDER/parachain/Cargo.lock

pushd ..
popd
pwd

# Replace Parity's CI files, that we have overwritten in our fork, to run our own CI
rm -rf .github
Expand All @@ -78,7 +79,4 @@ git fetch parity master
git checkout parity/master -- .github
git add -- .github

popd
popd

echo "OK"

0 comments on commit 2c987b9

Please sign in to comment.