Skip to content

Commit

Permalink
Merge pull request #151 from fermoya/feat/extract-ci-scripts
Browse files Browse the repository at this point in the history
Fixed rebase script
  • Loading branch information
fermoya committed Nov 2, 2020
2 parents 526c6bc + f5e1c5a commit 2fc85da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/rebase.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FOLDER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
TEMP_DIR=".tmp"

mkdir $TEMP_DIR
cd $TEMP_DIR

git clone https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
cd $FOLDER
Expand All @@ -21,5 +25,5 @@ git rebase origin/$BASE_BRANCH
echo git push --force-with-lease origin $OUTDATED_BRANCH
git push --force-with-lease origin $OUTDATED_BRANCH

cd ..
rm -rf $FOLDER
cd ../..
rm -rf $TEMP_DIR

0 comments on commit 2fc85da

Please sign in to comment.