Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/versions.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IMAGE_VERSION=1.21.9
IMAGE_VERSION=1.21.10
NDK_VERSION=27.2.12479018
BAZELISK_VERSION=v1.26.0
4 changes: 2 additions & 2 deletions android_dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ RUN RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmy
RUN echo "export NVM_DIR=${NVM_DIR}" >> /home/${ACTUAL_USER}/.zshrc && \
echo "export PNPM_HOME=${PNPM_HOME}" >> /home/${ACTUAL_USER}/.zshrc && \
echo "export PATH=${PATH}" >> /home/${ACTUAL_USER}/.zshrc && \
echo "source ${NVM_DIR}/nvm.sh" >> /home/${ACTUAL_USER}/.zshrc && \
echo "tmux attach-session -t dev-session 2>/dev/null || tmux new-session -s dev-session" >> /home/${ACTUAL_USER}/.zshrc
echo "source ${NVM_DIR}/nvm.sh" >> /home/${ACTUAL_USER}/.zshrc

# Switch back to root for remaining setup
USER root

COPY tmux.conf /etc/tmux.conf
COPY entrypoint.sh /opt/workspace/entrypoint.sh
RUN chmod +x /opt/workspace/entrypoint.sh

Expand Down
7 changes: 6 additions & 1 deletion android_dev/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ WORKSPACE_DIR="/opt/workspace"
REPO_NAME=$(basename "${GIT_REPO}")
CLONE_DIR="${WORKSPACE_DIR}/${REPO_NAME}"

# Define the tmux session name
TMUX_SESSION_NAME="${GIT_BRANCH}-${REPO_NAME}"
export TMUX_SESSION_NAME

# --- 1. Clone Git Repository ---
echo "Cloning repository '${GIT_REPO}' from branch '${GIT_BRANCH}'..."

# Clone the repository into a specific subdirectory within the workspace
git clone --branch "${GIT_BRANCH}" "https://${GIT_PROVIDER}/${GIT_REPO}" "${CLONE_DIR}"
git clone --branch "${GIT_BRANCH}" "git@${GIT_PROVIDER}:${GIT_REPO}.git" "${CLONE_DIR}"
# The user should be in the clone folder right after login
echo "cd $CLONE_DIR" >> "/home/${ACTUAL_USER}/.zshrc"
echo "tmux attach-session -t \"${TMUX_SESSION_NAME}\" 2>/dev/null || tmux new-session -s \"${TMUX_SESSION_NAME}\"" >> "/home/${ACTUAL_USER}/.zshrc"

# --- 2. Set Permissions ---

Expand Down
35 changes: 35 additions & 0 deletions android_dev/tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Set the prefix to Ctrl+b
set-option -g prefix C-b
bind-key C-b send-prefix

# Enable mouse mode (tmux 2.1 and above)
set -g mouse on

# Set a longer history limit
set -g history-limit 10000

# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1

# Renumber windows when a window is closed
set-option -g renumber-windows on

# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Shift-arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window

# Easy-to-remember split pane commands
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %

# Reload config file
bind r source-file /etc/tmux.conf \; display "Reloaded!"