From 23bb17a76f14b01118e0d384cdd041d04be2cf14 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:27:18 +0900 Subject: [PATCH] CC-2075: Update Gleam to 1.13 --- compiled_starters/gleam/README.md | 2 +- compiled_starters/gleam/codecrafters.yml | 4 ++-- dockerfiles/gleam-1.13.Dockerfile | 17 +++++++++++++++++ solutions/gleam/01-at4/code/README.md | 2 +- solutions/gleam/01-at4/code/codecrafters.yml | 4 ++-- starter_templates/gleam/config.yml | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 dockerfiles/gleam-1.13.Dockerfile diff --git a/compiled_starters/gleam/README.md b/compiled_starters/gleam/README.md index 112932f..0e95d3f 100644 --- a/compiled_starters/gleam/README.md +++ b/compiled_starters/gleam/README.md @@ -31,7 +31,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `gleam (1.11.1)` installed locally +1. Ensure you have `gleam (1.13.0)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `src/main.gleam`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/compiled_starters/gleam/codecrafters.yml b/compiled_starters/gleam/codecrafters.yml index 0357ab8..866e833 100644 --- a/compiled_starters/gleam/codecrafters.yml +++ b/compiled_starters/gleam/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Gleam version used to run your code # on Codecrafters. # -# Available versions: gleam-1.11 -buildpack: gleam-1.11 +# Available versions: gleam-1.13 +buildpack: gleam-1.13 diff --git a/dockerfiles/gleam-1.13.Dockerfile b/dockerfiles/gleam-1.13.Dockerfile new file mode 100644 index 0000000..3e7bc25 --- /dev/null +++ b/dockerfiles/gleam-1.13.Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.7-labs +FROM ghcr.io/gleam-lang/gleam:v1.13.0-erlang-alpine + +# Rebuild if gleam.toml or manifest.toml change +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="gleam.toml,manifest.toml" + +WORKDIR /app + +# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses +COPY --exclude=.git --exclude=README.md . /app + +# Force deps to be downloaded +RUN gleam build + +# Cache build directory +RUN mkdir -p /app-cached +RUN mv build /app-cached/build diff --git a/solutions/gleam/01-at4/code/README.md b/solutions/gleam/01-at4/code/README.md index 112932f..0e95d3f 100644 --- a/solutions/gleam/01-at4/code/README.md +++ b/solutions/gleam/01-at4/code/README.md @@ -31,7 +31,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `gleam (1.11.1)` installed locally +1. Ensure you have `gleam (1.13.0)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `src/main.gleam`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/solutions/gleam/01-at4/code/codecrafters.yml b/solutions/gleam/01-at4/code/codecrafters.yml index 0357ab8..866e833 100644 --- a/solutions/gleam/01-at4/code/codecrafters.yml +++ b/solutions/gleam/01-at4/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Gleam version used to run your code # on Codecrafters. # -# Available versions: gleam-1.11 -buildpack: gleam-1.11 +# Available versions: gleam-1.13 +buildpack: gleam-1.13 diff --git a/starter_templates/gleam/config.yml b/starter_templates/gleam/config.yml index 40ffaff..aad146f 100644 --- a/starter_templates/gleam/config.yml +++ b/starter_templates/gleam/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: gleam (1.11.1) + required_executable: gleam (1.13.0) user_editable_file: src/main.gleam