Skip to content

Commit 3746ac6

Browse files
Merge pull request #10 from cod3rocket/fix-mise-trust
Fix mise trust
2 parents d88a192 + 46183f0 commit 3746ac6

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ENV USER=cod3rocket
2020
ENV HOME=/home/$USER
2121
ENV PATH="$PATH:$HOME/.local/bin:$HOME/.local/share/mise/shims"
2222

23-
RUN dnf install -y curl ca-certificates tar freetype dejavu-sans-fonts fontconfig \
23+
RUN dnf install -y curl ca-certificates tar freetype dejavu-sans-fonts fontconfig git \
2424
&& dnf clean all \
2525
&& rm -rf /var/cache/yum \
2626
&& useradd -m -s /bin/bash $USER
@@ -37,10 +37,10 @@ COPY mise.toml /etc/mise/config.toml
3737

3838
RUN mise trust && mise install --yes && mise reshim
3939

40-
COPY --chown=$USER:$USER package.json bun.lock entrypoint.ts /opt/cod3rocket/pre-commit-hooks/
40+
COPY --chown=$USER:$USER package.json bun.lock main.ts entrypoint.sh /opt/cod3rocket/pre-commit-hooks/
4141

4242
WORKDIR /opt/cod3rocket/pre-commit-hooks
4343

4444
RUN bun i
4545

46-
ENTRYPOINT [ "bun", "run", "entrypoint.ts" ]
46+
ENTRYPOINT [ "/opt/cod3rocket/pre-commit-hooks/entrypoint.sh" ]

entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
paths=("$@")
4+
novo_paths=()
5+
6+
for path in "${paths[@]}"; do
7+
novo_paths+=("/src/$path")
8+
done
9+
10+
echo "Executa os hooks"
11+
cd /opt/cod3rocket/pre-commit-hooks/
12+
bun run main.ts "${novo_paths[@]}"
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pre-commit-hooks",
33
"version": "1.0.1",
4-
"module": "entrypoint.ts",
4+
"module": "main.ts",
55
"type": "module",
66
"private": true,
77
"devDependencies": {

0 commit comments

Comments
 (0)