Skip to content

Commit

Permalink
Merge pull request #38 from wehkamp/zsh-support
Browse files Browse the repository at this point in the history
Zsh support
  • Loading branch information
KeesCBakker authored Nov 4, 2024
2 parents d60a633 + 45648f7 commit 160345a
Show file tree
Hide file tree
Showing 5 changed files with 749 additions and 485 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# colors
NC='\033[0m' # no color
YELLOW='\033[1;33m'

# echo start instructions
echo -e "To start your bot-zero instance, please enter: ${YELLOW}npm run dev${NC}"
echo ""
15 changes: 11 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Start with the same base image
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18-bullseye
FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm

# Upgrade NPM
RUN npm install -g npm@9.6.7
RUN npm install -g npm@10.9.0 --no-audit --no-fund

# Install global packages
RUN npm install --no-audit --no-fund --global \
npm-check-updates

COPY ./startup.sh /
RUN chmod +x /startup.sh
RUN chmod +x /startup.sh

# Copy bash profile, if you copy it directly
# you'll lose your colors :-(
COPY ./.profile /tmp/.profile
RUN cat /tmp/.profile >> /home/node/.bashrc && \
cat /tmp/.profile >> /home/node/.zshrc && \
rm /tmp/.profile

22 changes: 5 additions & 17 deletions .devcontainer/startup.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/bin/sh

set -e

# trust the repo
# fixes:
# - fatal: detected dubious ownership in repository at '/workspaces/bot-zero'.
# - fatal: detected dubious ownership in repository at '/workspaces/bot-zero'.
# - warning: safe.directory 'C:/{...}/blaze-platform-provisioning' not absolute
git config --global --unset-all safe.directory > /dev/null 2>&1
git config --global --add safe.directory "$PWD"

# config local GPG for signing
# fixes:
# - error: cannot run C:\Program Files (x86)\Gpg4win..\GnuPG\bin\gpg.exe: No such file or directory.
git config --global gpg.program gpg

# install NPM packages
echo ""
echo "Installing packages..."
Expand All @@ -21,14 +20,3 @@ if [ ! -f .env ]; then
echo "Copying .example.env to .env..."
cp .example.env .env
fi

# colors
NC='\033[0m' # no color
BLUE='\033[1;34m'
YELLOW='\033[1;33m'

# echo start instructions
echo ""
echo ""
echo "${BLUE}To start your bot-zero instance, please enter: ${YELLOW}npm run dev${NC}"
echo ""
Loading

0 comments on commit 160345a

Please sign in to comment.