mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix
This commit is contained in:
@@ -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}`);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
pnpm test
|
||||||
Executable
+20
@@ -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
@@ -26,5 +26,5 @@ keywords:
|
|||||||
- web-ui
|
- web-ui
|
||||||
- agent
|
- agent
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
version: 1.1.6
|
version: 1.1.8
|
||||||
date-released: "2026-01-01"
|
date-released: "2026-01-01"
|
||||||
|
|||||||
+3
-1
@@ -11,7 +11,8 @@
|
|||||||
"db:generate": "drizzle-kit generate",
|
"db:generate": "drizzle-kit generate",
|
||||||
"db:migrate": "drizzle-kit migrate",
|
"db:migrate": "drizzle-kit migrate",
|
||||||
"db:drop": "drizzle-kit drop",
|
"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": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^5.0.1",
|
"@hookform/resolvers": "^5.0.1",
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
"eslint-config-next": "^16.0.1",
|
"eslint-config-next": "^16.0.1",
|
||||||
"eslint-plugin-tailwindcss": "^3.18.0",
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
||||||
"framer-motion": "^12.24.7",
|
"framer-motion": "^12.24.7",
|
||||||
|
"husky": "^9.1.7",
|
||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"tailwindcss": "^4.1.7",
|
"tailwindcss": "^4.1.7",
|
||||||
"tsx": "^4.19.4",
|
"tsx": "^4.19.4",
|
||||||
|
|||||||
Generated
+10
@@ -300,6 +300,9 @@ importers:
|
|||||||
framer-motion:
|
framer-motion:
|
||||||
specifier: ^12.24.7
|
specifier: ^12.24.7
|
||||||
version: 12.24.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
|
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:
|
postcss:
|
||||||
specifier: ^8.5.3
|
specifier: ^8.5.3
|
||||||
version: 8.5.6
|
version: 8.5.6
|
||||||
@@ -4701,6 +4704,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
|
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
|
|
||||||
|
husky@9.1.7:
|
||||||
|
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
ieee754@1.2.1:
|
ieee754@1.2.1:
|
||||||
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
||||||
|
|
||||||
@@ -11913,6 +11921,8 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
husky@9.1.7: {}
|
||||||
|
|
||||||
ieee754@1.2.1: {}
|
ieee754@1.2.1: {}
|
||||||
|
|
||||||
ignore@5.3.2: {}
|
ignore@5.3.2: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user