Skip to content

Commit 63bb585

Browse files
Merge pull request #11 from cod3rocket/dev
Versão 1.0.2
2 parents 4997ed6 + 300fb2b commit 63bb585

7 files changed

Lines changed: 23 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: .
3-
rev: v1.0.1
3+
rev: v1.0.2
44
hooks:
55
- id: cod3rocket
66
exclude: test/

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- id: cod3rocket
22
name: Cod3Rocket
3-
entry: ghcr.io/cod3rocket/pre-commit-hooks:v1.0.1
3+
entry: ghcr.io/cod3rocket/pre-commit-hooks:v1.0.2
44
language: docker_image
55

66
- id: cod3rocket-dev

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" ]

Taskfile.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ version: "3"
22

33
tasks:
44
build:dev:
5-
cmd: docker buildx build -t ghcr.io/cod3rocket/pre-commit-hooks:dev .
5+
cmd: docker buildx build
6+
--build-arg BUILD_VERSION=dev
7+
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
8+
-t ghcr.io/cod3rocket/pre-commit-hooks:dev .

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pre-commit-hooks",
3-
"version": "1.0.1",
4-
"module": "entrypoint.ts",
3+
"version": "1.0.2",
4+
"module": "main.ts",
55
"type": "module",
66
"private": true,
77
"devDependencies": {

0 commit comments

Comments
 (0)