Skip to content

Commit

Permalink
shared in install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Mar 19, 2024
1 parent d15eb33 commit 96a9394
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
12 changes: 11 additions & 1 deletion install_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ fi

set -e
set -o pipefail
npm install
echo "INSTALLING SHARED..."
cd shared/
if [ "$CLEAN" = "true" ]; then
echo " ...deleting node modules";
rm -rf node_modules/
fi
git checkout develop
git pull
npm install
cd ..

echo "INSTALLING CORE..."
npm install
if [ ! -d "cables/" ]; then
git clone [email protected]:pandrr/cables.git
fi
Expand Down
23 changes: 23 additions & 0 deletions update_repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ fi
set -e
set -o pipefail

echo "UPDATING SHARED..."
cd shared
if [ -n "${1}" ] && [ "clean" != "${1}" ]; then
git checkout "${1}"
fi
# get current branch
branch=`git rev-parse --abbrev-ref HEAD`
# ignore errors here, since branch might not be on remote
git fetch || true
git pull origin "$branch" || true
# merge current remote develop if branch is not master
if [ "master" != "${branch}" ]; then
echo "merging current state of origin/develop into ${branch}";
git merge origin/develop;
else
echo "WARNING: not merging origin/develop into master!"
fi
if [ "clean" == "${1}" ]; then
rm -rf node_modules/
fi
npm i
cd ..

echo "UPDATING CORE..."
cd cables
if [ -n "${1}" ] && [ "clean" != "${1}" ]; then
Expand Down

0 comments on commit 96a9394

Please sign in to comment.