Skip to content

Commit f478870

Browse files
authored
Merge pull request #95 from codecrafters-io/replace-submission-dir
replace-submission-dir
2 parents 040a96f + 889c601 commit f478870

9 files changed

+9
-9
lines changed

dockerfiles/cpp-23.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ RUN mkdir -p /app-cached/build
3636
RUN if [ -d "/app/build" ]; then mv /app/build /app-cached; fi
3737
RUN if [ -d "/app/vcpkg_installed" ]; then mv /app/vcpkg_installed /app-cached/build; fi
3838

39-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake && cmake --build ./build && sed -i '/^cmake/ s/^/# /' ./your_server.sh" > /codecrafters-precompile.sh
39+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake && cmake --build ./build && sed -i '/^cmake/ s/^/# /' ./your_server.sh" > /codecrafters-precompile.sh
4040
RUN chmod +x /codecrafters-precompile.sh

dockerfiles/dotnet-6.0.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN rm /app/src/Program.cs
1818
RUN rm -rf /app/obj
1919
RUN rm -rf /app/bin
2020

21-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh
21+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh
2222
RUN chmod +x /codecrafters-precompile.sh
2323

2424
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="codecrafters-http-server.csproj,codecrafters-http-server.sln"

dockerfiles/dotnet-8.0.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ COPY --exclude=.git --exclude=README.md . /app
1313
RUN dotnet build --configuration Release .
1414

1515
# Legacy support, remove in the next version of this dockerfile
16-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh
16+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh
1717
RUN chmod +x /codecrafters-precompile.sh

dockerfiles/haskell-9.4.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN cp -r .stack-work /tmp/
2626
RUN rm -rf /app/app
2727
RUN rm -rf /app/src
2828

29-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cp -r /tmp/.stack-work . && stack build" > /codecrafters-precompile.sh
29+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && cp -r /tmp/.stack-work . && stack build" > /codecrafters-precompile.sh
3030
RUN chmod +x /codecrafters-precompile.sh
3131

3232
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="stack.yaml,package.yaml,stack.yaml.lock"

dockerfiles/java-21.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ RUN mv /app/target /app-cached # Is this needed?
1313

1414
# Pre-compile steps
1515
# Note: Previously, /tmp/codecrafters-http-target was hardcoded in your_server.sh. We've now switched to using /tmp/codecrafters-build-http-server-java
16-
RUN printf "cd \${CODECRAFTERS_SUBMISSION_DIR} && mvn -B package -Ddir=/tmp/codecrafters-build-http-server-java && sed -i 's/^\(mvn .*\)/#\1/' ./your_server.sh && sed -i 's|/tmp/codecrafters-http-target|/tmp/codecrafters-build-http-server-java|g' ./your_server.sh" > /codecrafters-precompile.sh
16+
RUN printf "cd \${CODECRAFTERS_REPOSITORY_DIR} && mvn -B package -Ddir=/tmp/codecrafters-build-http-server-java && sed -i 's/^\(mvn .*\)/#\1/' ./your_server.sh && sed -i 's|/tmp/codecrafters-http-target|/tmp/codecrafters-build-http-server-java|g' ./your_server.sh" > /codecrafters-precompile.sh
1717
RUN chmod +x /codecrafters-precompile.sh

dockerfiles/rust-1.70.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN cargo clean -p http-server-starter-rust --release --target-dir=/tmp/codecraf
1313

1414
RUN rm -rf /app/src
1515

16-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
16+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
1717
RUN chmod +x /codecrafters-precompile.sh
1818

1919
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"

dockerfiles/rust-1.76.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN cargo clean -p http-server-starter-rust --release --target-dir=/tmp/codecraf
1313

1414
RUN rm -rf /app/src
1515

16-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
16+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
1717
RUN chmod +x /codecrafters-precompile.sh
1818

1919
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"

dockerfiles/rust-1.77.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY --exclude=.git --exclude=README.md . /app
99
RUN cargo build --release --target-dir=/tmp/codecrafters-http-server-target
1010
RUN cargo clean -p http-server-starter-rust --release --target-dir=/tmp/codecrafters-http-server-target
1111

12-
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
12+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && cargo build --release --target-dir=/tmp/codecrafters-http-server-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
1313
RUN chmod +x /codecrafters-precompile.sh
1414

1515
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"

dockerfiles/zig-0.12.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /et
1717
# Update the package list and install Zig
1818
RUN apk add --no-cache zig@community=0.12.0-r0
1919

20-
RUN printf "set -e \ncd \${CODECRAFTERS_SUBMISSION_DIR} \necho 'Running zig build' \nzig build \necho 'zig build completed.' \n" > /codecrafters-precompile.sh
20+
RUN printf "set -e \ncd \${CODECRAFTERS_REPOSITORY_DIR} \necho 'Running zig build' \nzig build \necho 'zig build completed.' \n" > /codecrafters-precompile.sh
2121
RUN chmod +x /codecrafters-precompile.sh

0 commit comments

Comments
 (0)