Skip to content

Commit

Permalink
address coderabbit comments; fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
valeksiev committed Dec 5, 2024
1 parent d53bb38 commit bb9a38f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,25 @@ ARG GO_VERSION=1.21.6
ARG HUGO_VERSION=0.121.2
ARG TARGETARCH

RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y git wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install git, go and hugo
RUN apt-get upgrade -y
RUN apt-get update -y
RUN apt-get install -y git wget
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz && tar -C /usr/local -xzf go${GO_VERSION}.linux-${TARGETARCH}.tar.gz

RUN export PATH=$PATH:/usr/local/go/bin:/usr/local && go version
ENV PATH="/usr/local/go/bin:/usr/local:${PATH}"
RUN go version

RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz \
&& tar -C /bin -xzf hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz \
&& rm hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz

RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz && tar -C /bin -xzf hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz && ls -al /usr/local
RUN hugo version

# Install Poetry
Expand Down
4 changes: 2 additions & 2 deletions ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def embed_text(documents: list[Document]):

async def ensure_cloned(repo_name: str, path: str):
if os.path.exists(path):
logger.info(f"Repository {repo_name} already cloned.")
logger.info(f"Repository {path} already cloned.")
repo = Repo.init(path)
else:
logger.info(f"Closning repository: {repo_name}")
logger.info(f"Closning repository: {path}")
repo = Repo.clone_from(repo_name, path, branch="main")

repo.heads.main.checkout()
Expand Down

0 comments on commit bb9a38f

Please sign in to comment.