Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Remove ignore scripts (nuxt requires it) #1905

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ RUN pnpm fetch
# copy the rest of the content
COPY --chown=node:node . /home/node/app

# `--ignore-scripts` prevents the `prepare` script from running. This avoids
# installation of pre-commit inside the container.
RUN pnpm install -r --offline --ignore-scripts
# Prevent pre-commit from being installed, we don't need it here and it fails to install anyway
ENV SKIP_PRE_COMMIT=true

RUN pnpm install -r --offline

# disable telemetry when building the app
ENV NUXT_TELEMETRY_DISABLED=1
Expand Down
11 changes: 11 additions & 0 deletions bin/install-pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env sh

set -e

if [ -z "$SKIP_PRE_COMMIT" ]
then
echo "installing pre-commit"
pnpm pc:download && pnpm pc:install
else
echo "skipping pre-commit installation"
fi
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "sebworks",
"private": true,
"scripts": {
"prepare": "pnpm pc:download && pnpm pc:install",
"prepare": "./bin/install-pre-commit.sh",
"predev": "pnpm install && pnpm i18n:no-get",
"dev": "pnpm dev:only",
"dev:only": "nuxt --hostname 0.0.0.0",
Expand Down