From af111e311ffceb6ded08aab7646d74be0d462ce9 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Tue, 11 Mar 2025 21:07:53 +0800 Subject: [PATCH] Upgrade Gleam to 1.9.1 --- compiled_starters/gleam/README.md | 2 +- compiled_starters/gleam/codecrafters.yml | 4 ++-- dockerfiles/gleam-1.9.Dockerfile | 17 +++++++++++++++++ solutions/gleam/01-dr6/code/README.md | 2 +- solutions/gleam/01-dr6/code/codecrafters.yml | 4 ++-- starter_templates/gleam/config.yml | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 dockerfiles/gleam-1.9.Dockerfile diff --git a/compiled_starters/gleam/README.md b/compiled_starters/gleam/README.md index 98d7189..00a95f4 100644 --- a/compiled_starters/gleam/README.md +++ b/compiled_starters/gleam/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `gleam (1.0+)` installed locally +1. Ensure you have `gleam (1.9.1)` 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 7f675c4..54d51c3 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.6 -language_pack: gleam-1.6 +# Available versions: gleam-1.9 +language_pack: gleam-1.9 diff --git a/dockerfiles/gleam-1.9.Dockerfile b/dockerfiles/gleam-1.9.Dockerfile new file mode 100644 index 0000000..0a1dbac --- /dev/null +++ b/dockerfiles/gleam-1.9.Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.7-labs +FROM ghcr.io/gleam-lang/gleam:v1.9.1-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-dr6/code/README.md b/solutions/gleam/01-dr6/code/README.md index 98d7189..00a95f4 100644 --- a/solutions/gleam/01-dr6/code/README.md +++ b/solutions/gleam/01-dr6/code/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `gleam (1.0+)` installed locally +1. Ensure you have `gleam (1.9.1)` 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-dr6/code/codecrafters.yml b/solutions/gleam/01-dr6/code/codecrafters.yml index 7f675c4..54d51c3 100644 --- a/solutions/gleam/01-dr6/code/codecrafters.yml +++ b/solutions/gleam/01-dr6/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.6 -language_pack: gleam-1.6 +# Available versions: gleam-1.9 +language_pack: gleam-1.9 diff --git a/starter_templates/gleam/config.yml b/starter_templates/gleam/config.yml index 329d8d6..d08e9ee 100644 --- a/starter_templates/gleam/config.yml +++ b/starter_templates/gleam/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: gleam (1.0+) + required_executable: gleam (1.9.1) user_editable_file: src/main.gleam