Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix(tools,docker): Fix docker script using old dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Guy Meehan committed Jan 22, 2023
1 parent 5cdc229 commit c9cdf7c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools/start_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [[ ! -d "$SCRIPT_DIR"/doom-nvim-contrib ]]; then
if git show-ref --quiet refs/heads/"$BRANCH_NAME"; then
git worktree add ./doom-nvim-contrib "$BRANCH_NAME"
else
git worktree add ./doom-nvim-contrib origin/develop -b "$BRANCH_NAME"
git worktree add ./doom-nvim-contrib origin/main -b "$BRANCH_NAME"
fi
fi

Expand All @@ -71,8 +71,8 @@ else
git checkout -b "$BRANCH_NAME" main
git fetch --quiet
# If changes between local and origin, get latest changes
if [[ ! $( git rev-list develop...origin/develop --count ) -eq 0 ]]; then
echo " - WARN: There are upstream changes to develop branch. Please pull latest changes"
if [[ ! $( git rev-list main...origin/main --count ) -eq 0 ]]; then
echo " - WARN: There are upstream changes to main branch. Please pull latest changes"
read -p " Do you want to continue creating $BRANCH_NAME? (y/n) " -n 1 -r
fi
# Create new branch for feature and check it out
Expand Down Expand Up @@ -100,14 +100,11 @@ fi

# Create docker container if haven't already
echo " - Success! Running docker container doom-nvim-contrib-container..."
mkdir -p "${SCRIPT_DIR}/local-share-nvim" "${SCRIPT_DIR}/workspace"
echo ""
docker run \
-it \
-e UID="1000" \
-e GID="1000" \
-v "$SCRIPT_DIR"/doom-nvim-contrib:/home/doom/.config/nvim \
-v "$SCRIPT_DIR"/local-share-nvim:/home/doom/.local/share/nvim \
-v "$SCRIPT_DIR"/workspace:/home/doom/workspace \
--name doom-nvim-contrib-container \
--user doom \
Expand Down

0 comments on commit c9cdf7c

Please sign in to comment.