Skip to content

Commit

Permalink
chore: remove unnecessary git init calls for static dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Oct 13, 2023
1 parent 74d48ce commit 61df7f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion cli/src/build-pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ async function buildBinaries(args: string[]) {
// Copy static dir, stripping out undesired files for the dist build
console.log(chalk.cyan("Copying static directory"))
await exec("rsync", ["-r", "-L", "--exclude=.garden", "--exclude=.git", STATIC_DIR, tmpDirPath])
await exec("git", ["init"], { cwd: tmpStaticDir })

// Copy each package to the temp dir
console.log(chalk.cyan("Getting package info"))
Expand Down
1 change: 0 additions & 1 deletion support/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ FROM garden-base-$VARIANT as garden-base
# Note: This Dockerfile is run with dist/linux-amd64 as the context root
ADD --chown=$USER:root . /garden
ENV PATH /garden:$PATH
RUN cd /garden/static && git init

WORKDIR $HOME
RUN GARDEN_DISABLE_ANALYTICS=true GARDEN_DISABLE_VERSION_CHECK=true garden util fetch-tools --all --garden-image-build
Expand Down
5 changes: 2 additions & 3 deletions support/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ FROM garden-base-$VARIANT as garden-base
# Note: This Dockerfile is run with dist/linux-amd64 as the context root
ADD --chown=$USER:root . /garden
ENV PATH /garden:$PATH
RUN cd /garden/static && git init

WORKDIR $HOME
RUN GARDEN_DISABLE_ANALYTICS=true GARDEN_DISABLE_VERSION_CHECK=true garden util fetch-tools --all --garden-image-build
Expand All @@ -83,7 +82,7 @@ ENV GCLOUD_VERSION=444.0.0
ENV GCLOUD_SHA256="cc76b9b40508253f812af5e52d4630e90230312969eece04ccfb5328c557acac"

RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz
RUN echo "${GCLOUD_SHA256} google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz" | sha256sum -c
RUN echo "${GCLOUD_SHA256} google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz" | sha256sum -c
RUN tar -xf google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz
RUN ./google-cloud-sdk/install.sh --quiet
RUN ./google-cloud-sdk/bin/gcloud components install kubectl gke-gcloud-auth-plugin --quiet
Expand Down Expand Up @@ -176,4 +175,4 @@ ENV PATH /google-cloud-sdk/bin:$PATH
COPY --chown=$USER:root --from=garden-azure-base /usr/bin/az /usr/bin/az
COPY --chown=$USER:root --from=garden-azure-base /opt/az /opt/az
COPY --chown=$USER:root --from=garden-azure-base /usr/local/bin/kubectl /usr/local/bin/kubectl
COPY --chown=$USER:root --from=garden-azure-base /usr/local/bin/kubelogin /usr/local/bin/kubelogin
COPY --chown=$USER:root --from=garden-azure-base /usr/local/bin/kubelogin /usr/local/bin/kubelogin

0 comments on commit 61df7f1

Please sign in to comment.