mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add husky to project for using versioned git hooks
This commit is contained in:
parent
6ce638bbc9
commit
e7b1c19bc8
2
.github/workflows/test_e2e.yml
vendored
2
.github/workflows/test_e2e.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
sudo cp ./nginx/e2e-test.conf /etc/nginx/sites-available/default
|
sudo cp ./nginx/e2e-test.conf /etc/nginx/sites-available/default
|
||||||
|
|
||||||
- name: wait for database to be ready
|
- 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
|
- name: Boot up test system | seed backend
|
||||||
run: bun turbo seed
|
run: bun turbo seed
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@ nbproject
|
|||||||
.metadata
|
.metadata
|
||||||
/out/*
|
/out/*
|
||||||
/.env
|
/.env
|
||||||
|
.env.git
|
||||||
package-lock.json
|
package-lock.json
|
||||||
/deployment/bare_metal/.env
|
/deployment/bare_metal/.env
|
||||||
/deployment/bare_metal/nginx/sites-available/gradido.conf
|
/deployment/bare_metal/nginx/sites-available/gradido.conf
|
||||||
|
|||||||
7
.husky/post-checkout
Normal file
7
.husky/post-checkout
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "Writing build metadata to .env.git"
|
||||||
|
cat > .env.git <<EOF
|
||||||
|
export BUILD_COMMIT=$(git rev-parse HEAD)
|
||||||
|
export BUILD_COMMIT_SHORT=$(git rev-parse --short HEAD)
|
||||||
|
export BUILD_VERSION=$(git describe --tags --always)
|
||||||
|
EOF
|
||||||
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@ -0,0 +1 @@
|
|||||||
|
turbo lint
|
||||||
4
bun.lock
4
bun.lock
@ -5,11 +5,13 @@
|
|||||||
"name": "gradido",
|
"name": "gradido",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"auto-changelog": "^2.4.0",
|
"auto-changelog": "^2.4.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"turbo": "^2.5.0",
|
"turbo": "^2.5.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"husky": "^9.1.7",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
@ -1966,6 +1968,8 @@
|
|||||||
|
|
||||||
"humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
|
"humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
|
||||||
|
|
||||||
|
"husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="],
|
||||||
|
|
||||||
"hypercore-crypto": ["hypercore-crypto@3.6.0", "", { "dependencies": { "b4a": "^1.6.6", "compact-encoding": "^2.15.0", "sodium-universal": "^5.0.0" } }, "sha512-0slkW1wzq4B95SD8Z5nt1Yf/3KrIcGsBWTJTsCjHzMXie+sZ5I2IkWcxX1mo4+c0xVESnKAKphKSpGf2kf2BGA=="],
|
"hypercore-crypto": ["hypercore-crypto@3.6.0", "", { "dependencies": { "b4a": "^1.6.6", "compact-encoding": "^2.15.0", "sodium-universal": "^5.0.0" } }, "sha512-0slkW1wzq4B95SD8Z5nt1Yf/3KrIcGsBWTJTsCjHzMXie+sZ5I2IkWcxX1mo4+c0xVESnKAKphKSpGf2kf2BGA=="],
|
||||||
|
|
||||||
"i18n": ["i18n@0.15.1", "", { "dependencies": { "@messageformat/core": "^3.0.0", "debug": "^4.3.3", "fast-printf": "^1.6.9", "make-plural": "^7.0.0", "math-interval-parser": "^2.0.1", "mustache": "^4.2.0" } }, "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA=="],
|
"i18n": ["i18n@0.15.1", "", { "dependencies": { "@messageformat/core": "^3.0.0", "debug": "^4.3.3", "fast-printf": "^1.6.9", "make-plural": "^7.0.0", "math-interval-parser": "^2.0.1", "mustache": "^4.2.0" } }, "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA=="],
|
||||||
|
|||||||
18
package.json
18
package.json
@ -19,20 +19,24 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "scripts/release.sh",
|
"release": "scripts/release.sh",
|
||||||
"installAll": "yarn && cd database && yarn && cd ../frontend && yarn && cd ../admin && yarn && cd ../backend && yarn && cd ../federation && yarn && cd ../dht-node && yarn && cd ../e2e-tests && yarn && cd ..",
|
"installAll": "yarn install",
|
||||||
"docker:admin": "docker build -f ./admin/Dockerfile --target production -t \"gradido/admin:latest\" --build-arg NODE_ENV=\"production\" --build-arg BUILD_COMMIT=$(git rev-parse HEAD) --build-arg BUILD_COMMIT_SHORT=$(git rev-parse --short HEAD) .",
|
"docker": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml up",
|
||||||
"docker:frontend": "docker build -f ./frontend/Dockerfile --target production -t \"gradido/frontend:latest\" --build-arg NODE_ENV=\"production\" --build-arg BUILD_COMMIT=$(git rev-parse HEAD) --build-arg BUILD_COMMIT_SHORT=$(git rev-parse --short HEAD) .",
|
"docker:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml build",
|
||||||
"docker": "BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml up"
|
"docker_dev": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose up",
|
||||||
|
"docker_dev:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose build",
|
||||||
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"auto-changelog": "^2.4.0",
|
"auto-changelog": "^2.4.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"turbo": "^2.5.0"
|
"turbo": "^2.5.0",
|
||||||
|
"cross-env": "^7.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4"
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"husky": "^9.1.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6858,6 +6858,11 @@ humanize-ms@^1.2.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "^2.0.0"
|
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:
|
hypercore-crypto@^3.3.0, hypercore-crypto@^3.3.1:
|
||||||
version "3.6.0"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/hypercore-crypto/-/hypercore-crypto-3.6.0.tgz#6986cc4038339c4402282bbdf33a4fe2dea98db7"
|
resolved "https://registry.yarnpkg.com/hypercore-crypto/-/hypercore-crypto-3.6.0.tgz#6986cc4038339c4402282bbdf33a4fe2dea98db7"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user