Skip to content

Commit

Permalink
Merge branch 'main' into add-secondary-shells
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang authored Jan 31, 2025
2 parents bcd8e9b + a97cefe commit 8b82278
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
File renamed without changes.
36 changes: 36 additions & 0 deletions .devcontainer/alpine-temurin-container/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
"name": "Alpine",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:dev-alpine3.21",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "java-23.Dockerfile"
},
"features": {
// "ghcr.io/devcontainers/features/go:1": {
// "version": "latest"
// }
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo apk add dash go git-lfs make && git config --global core.pager cat",

// Configure tool-specific properties.
"customizations": {"vscode": {"extensions": ["golang.go", "wakatime.vscode-wakatime", "eamodio.gitlens"]}}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 2 additions & 0 deletions .devcontainer/alpine-temurin-container/java-23.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# syntax=docker/dockerfile:1.7-labs
FROM maven:3.9.9-eclipse-temurin-23-alpine
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ define run_test
dist/main.out
endef

define run_debug
export TESTER_DIR="/workspaces/shell-tester" && cd $(2) && \
CODECRAFTERS_REPOSITORY_DIR=/workspaces/shell-tester/$(2) \
CODECRAFTERS_TEST_CASES_JSON="$(1)" \
$(shell pwd)/dist/main.out
endef

BASE_STAGES = $(call quote_strings,$(_BASE_STAGES))
NAVIGATION_STAGES = $(call quote_strings,$(_NAVIGATION_STAGES))
QUOTING_STAGES = $(call quote_strings,$(_QUOTING_STAGES))
Expand Down Expand Up @@ -220,4 +227,12 @@ test_zsh:
make test_nav_w_zsh
make test_quoting_w_zsh
make test_redirections_w_zsh
make test_completions_w_zsh
make test_completions_w_zsh

# Clone the repo in `debug` directory
test_debug: build
$(call run_debug,$(BASE_STAGES),debug)
$(call run_debug,$(NAVIGATION_STAGES),debug)
$(call run_debug,$(QUOTING_STAGES),debug)
$(call run_debug,$(REDIRECTIONS_STAGES),debug)
$(call run_debug,$(COMPLETIONS_STAGES),debug)

0 comments on commit 8b82278

Please sign in to comment.