From d7a92a2b7ac2c2315a85f9c351e7d55fff255a7b Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Tue, 16 Feb 2021 16:22:29 -0600 Subject: [PATCH] feat: Make update detach origin remote --- script/update | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script/update b/script/update index 32f20ccd..fcd2e5c6 100755 --- a/script/update +++ b/script/update @@ -8,6 +8,15 @@ DIR_PATH=$(dirname $FULL_PATH) $DIR_PATH/bootstrap +ORIGIN=`git remote get-url origin || echo ''` +FRAMEWORK=`git remote get-url framework || echo ''` + +if [ "$ORIGIN" == 'git@gitlab.com:mythic-insight/legendary.git' ] && [ "$FRAMEWORK" != 'git@gitlab.com:mythic-insight/legendary.git' ]; then + echo "Setting Legendary repo as 'framework' remote" + git remote add framework git@gitlab.com:mythic-insight/legendary.git + git remote remove origin +fi; + mix deps.get mix npm.install mix ecto.create