This commit is contained in:
Théo LAGACHE
2026-01-06 16:12:04 +01:00
parent e1d1a3fb9a
commit 40a6e9e69f
6 changed files with 72 additions and 2 deletions
+37
View File
@@ -0,0 +1,37 @@
const fs = require('fs');
const expectedVersion = process.argv[2];
if (!expectedVersion) {
console.log('No version provided to check. Skipping.');
process.exit(0);
}
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const cff = fs.readFileSync('CITATION.cff', 'utf-8');
const cffVersionMatch = cff.match(/^version: (.*)$/m);
const cffVersion = cffVersionMatch ? cffVersionMatch[1].trim() : null;
let hasError = false;
if (pkg.version !== expectedVersion) {
console.error(`package.json version (${pkg.version}) does not match tag (${expectedVersion})`);
hasError = true;
}
if (cffVersion !== expectedVersion) {
console.error(`CITATION.cff version (${cffVersion}) does not match tag (${expectedVersion})`);
hasError = true;
}
if (pkg.version !== cffVersion) {
console.error(`Version mismatch between files: package.json (${pkg.version}) vs CITATION.cff (${cffVersion})`);
hasError = true;
}
if (hasError) {
process.exit(1);
}
console.log(`Versions match tag ${expectedVersion}`);
+1
View File
@@ -0,0 +1 @@
pnpm test
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
while read local_ref local_sha remote_ref remote_sha
do
if echo "$local_ref" | grep -q 'refs/tags/'; then
TAG_NAME=$(echo "$local_ref" | sed 's|refs/tags/||')
VERSION_NUM=$(echo "$TAG_NAME" | sed 's/^v//')
echo "Verifying tag $TAG_NAME against project files..."
node .github/scripts/versions.js "$VERSION_NUM"
if [ $? -ne 0 ]; then
echo "Push aborted due to version mismatch."
exit 1
fi
fi
done
exit 0
+1 -1
View File
@@ -26,5 +26,5 @@ keywords:
- web-ui
- agent
license: Apache-2.0
version: 1.1.6
version: 1.1.8
date-released: "2026-01-01"
+3 -1
View File
@@ -11,7 +11,8 @@
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:drop": "drizzle-kit drop",
"auth:generate": "npx @better-auth/cli generate --config ./src/lib/auth/auth.ts"
"auth:generate": "npx @better-auth/cli generate --config ./src/lib/auth/auth.ts",
"prepare": "husky"
},
"dependencies": {
"@hookform/resolvers": "^5.0.1",
@@ -113,6 +114,7 @@
"eslint-config-next": "^16.0.1",
"eslint-plugin-tailwindcss": "^3.18.0",
"framer-motion": "^12.24.7",
"husky": "^9.1.7",
"postcss": "^8.5.3",
"tailwindcss": "^4.1.7",
"tsx": "^4.19.4",
+10
View File
@@ -300,6 +300,9 @@ importers:
framer-motion:
specifier: ^12.24.7
version: 12.24.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
husky:
specifier: ^9.1.7
version: 9.1.7
postcss:
specifier: ^8.5.3
version: 8.5.6
@@ -4701,6 +4704,11 @@ packages:
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
engines: {node: '>= 6'}
husky@9.1.7:
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
engines: {node: '>=18'}
hasBin: true
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@@ -11913,6 +11921,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
husky@9.1.7: {}
ieee754@1.2.1: {}
ignore@5.3.2: {}