-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop docker compose, use layer cache instead
This drops the bat-server setup with a docker-compose in favor of a not so over-engineered dockerfile. This leverages the docker layer cache on each image re-build, so there's no need to run `bat cache --build` if the syntax didn't change. The point of bat-server was being able to use it for both highlight_ and theme_regression.sh. But we can do that with a plain old Docker image if we overwrite the entrypoint (run_highlight_ vs run_theme_regression.sh). This improves DX for two reasons: 1. no need to `docker compose down` at the end of a coding session. (I always forget.) 2. doesn't `bat cache --build` when the syntax file didn't change, which makes that case speedup 2-3x.
- Loading branch information
Showing
8 changed files
with
33 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# only used for bat-test.dockerfile | ||
|
||
* | ||
!/syntaxes/ | ||
!/tests/docker/*regression.sh | ||
!/tests/source |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# usage: through highlight_regression.sh and theme_regression.sh | ||
|
||
FROM curlimages/curl:latest AS fetch-pkg | ||
LABEL keep=false | ||
ARG BAT_VERSION=0.21.0 | ||
RUN curl -LJ \ | ||
https://github.com/sharkdp/bat/releases/download/v$BAT_VERSION/bat_${BAT_VERSION}_amd64.deb \ | ||
--output /tmp/bat.deb | ||
|
||
FROM debian:bullseye-slim | ||
COPY --from=fetch-pkg /tmp/bat.deb /tmp | ||
RUN dpkg --install /tmp/bat.deb | ||
ENV COLORTERM=truecolor | ||
COPY ./tests/docker/*regression.sh /tests/ | ||
COPY ./tests/source /tests/source | ||
COPY ./syntaxes/cmd-help.sublime-syntax /root/.config/bat/syntaxes/ | ||
RUN bat cache --build > /dev/null | ||
ENTRYPOINT /tests/run_highlight_regression.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters