Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Nov 28, 2023
1 parent 719278b commit 6aba822
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/src/guides/languages/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ builder:
WORKDIR /build
COPY --dir ./migrations ./data ./refinery.toml .
DO ./../../earthly/postgresql+SETUP
DO ./../../earthly/postgresql+BUILDER
```

The first target we are going to consider will be responsible to prepare a PostgreSQL environment (Earthly `+postgres-base` target),
migrations, migrations configuration and seed data (`COPY --dir ./migrations ./data ./refinery.toml .`),
doing some final build step (Earthly `+SETUP` UDC target).
doing some final build step (Earthly `+BUILDER` UDC target).

In the next steps we are going to inheriting from this `+builder` target which contains all necessary data,
dependencies, environment to properly run PostgreSQL database.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/guides/languages/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ builder:
FROM ./../../earthly/python+python-base
COPY --dir ./src .
DO ./../../earthly/python+SETUP
DO ./../../earthly/python+BUILDER
```

The first target `builder` is responsible to prepare an already configured Python environment,
Expand All @@ -62,7 +62,7 @@ so it is mandatory to have `pyproject.toml` and `poetry.lock` files in the root
The fist step of the `builder` target is prepare a Python environment
with poetry via `+python-base` target.
Next step is to copy source code of the project and finally finalize the build
with some poetry project setup which is done with `+SETUP` UDC target.
with some poetry project setup which is done with `+BUILDER` UDC target.

### Running checks

Expand Down
2 changes: 1 addition & 1 deletion earthly/docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ deps:
git

# Install poetry and our python dependencies.
DO ../python+SETUP
DO ../python+BUILDER

# Copy our run scripts
COPY --dir scripts /scripts
Expand Down
2 changes: 1 addition & 1 deletion earthly/postgresql/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sqlfluff-image:

# Common PostgreSQL setup.
# Prepare important files needed for building image
SETUP:
BUILDER:
COMMAND

RUN cp /root/.sqlfluff .
Expand Down
2 changes: 1 addition & 1 deletion earthly/python/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ python-base:
# Common python builder setup.
# Parameters:
# opts : Options passed to the `poetry install` command.
SETUP:
BUILDER:
COMMAND
ARG opts

Expand Down
2 changes: 1 addition & 1 deletion earthly/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VERSION 0.7
rust-base:
# This is our base Host toolset, and rustup.
# The ACTUAL version of rust that will be used, and available targets
# is controlled by a `rust-toolchain.toml` file when the RUST_SETUP UDC is run.
# is controlled by a `rust-toolchain.toml` file when the `SETUP` UDC is run.
# HOWEVER, It is enforced that the rust version in `rust-toolchain.toml` MUST match this version.
FROM rust:1.73-alpine3.18

Expand Down
2 changes: 1 addition & 1 deletion examples/postgresql/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ builder:
WORKDIR /build

COPY --dir ./migrations ./data ./refinery.toml .
DO ./../../earthly/postgresql+SETUP
DO ./../../earthly/postgresql+BUILDER

check:
FROM +builder
Expand Down
2 changes: 1 addition & 1 deletion examples/python/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ builder:
FROM ./../../earthly/python+python-base

COPY --dir ./src .
DO ./../../earthly/python+SETUP
DO ./../../earthly/python+BUILDER

test:
FROM +builder
Expand Down

0 comments on commit 6aba822

Please sign in to comment.