From e7b1c19bc8a0d0ed73aeaa98283be3e47af47831 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 5 May 2025 11:25:50 +0200 Subject: [PATCH] add husky to project for using versioned git hooks --- .github/workflows/test_e2e.yml | 2 +- .gitignore | 1 + .husky/post-checkout | 7 +++++++ .husky/pre-commit | 1 + bun.lock | 4 ++++ package.json | 18 +++++++++++------- yarn.lock | 5 +++++ 7 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 .husky/post-checkout create mode 100644 .husky/pre-commit diff --git a/.github/workflows/test_e2e.yml b/.github/workflows/test_e2e.yml index c792f9a0b..5015e3887 100644 --- a/.github/workflows/test_e2e.yml +++ b/.github/workflows/test_e2e.yml @@ -23,7 +23,7 @@ jobs: sudo cp ./nginx/e2e-test.conf /etc/nginx/sites-available/default - name: wait for database to be ready - run: docker run --rm --network gradido_internal-net busybox sh -c 'until nc -z mariadb 3306; do echo waiting for db; sleep 1; done;' + run: until nc -z localhost 3306; do echo waiting for db; sleep 1; done; - name: Boot up test system | seed backend run: bun turbo seed diff --git a/.gitignore b/.gitignore index 149d8d245..68f604c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ nbproject .metadata /out/* /.env +.env.git package-lock.json /deployment/bare_metal/.env /deployment/bare_metal/nginx/sites-available/gradido.conf diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100644 index 000000000..c7b7eeade --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,7 @@ +#!/bin/bash +echo "Writing build metadata to .env.git" +cat > .env.git <=18" - } + } } diff --git a/yarn.lock b/yarn.lock index 22ac25cd1..cde6da2bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6858,6 +6858,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +husky@^9.1.7: + version "9.1.7" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" + integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== + hypercore-crypto@^3.3.0, hypercore-crypto@^3.3.1: version "3.6.0" resolved "https://registry.yarnpkg.com/hypercore-crypto/-/hypercore-crypto-3.6.0.tgz#6986cc4038339c4402282bbdf33a4fe2dea98db7"