chore [P-137]: test

This commit is contained in:
Nukeap committed 2025-02-06 09:07:31 +03:00
1 parent 476a4679b0
commit 24b4a76cf6
3 files changed
+9 -15

No files matched your search

-1
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env sh #!/usr/bin/env sh
npm run commitlint --edit ${1} npm run commitlint --edit ${1}
node ./commit-v.js "$1"
-14
View File
@@ -1,14 +0,0 @@
import { execSync } from 'child_process';
const commitMessage = process.argv[2];
console.log(process.argv);
if (commitMessage) {
// Проверяем, содержит ли сообщение коммита определенные ключевые слова
const isPatch = /^(fix|chore)/.test(commitMessage); // Например, если тип "fix" или "chore"
if (isPatch) {
console.log('Обновление версии патча...');
execSync('cd src/front && npm version patch', { stdio: 'inherit' });
}
}
+9
View File
@@ -1,3 +1,4 @@
import { execSync } from 'child_process';
export default { export default {
rules: { rules: {
'header-max-length': [2, 'always', 72], // Максимальная длина заголовка 'header-max-length': [2, 'always', 72], // Максимальная длина заголовка
@@ -27,6 +28,14 @@ export default {
Например: feat [X-01]: я тут накоммитил`, Например: feat [X-01]: я тут накоммитил`,
]; ];
} else {
const isPatch = /^(fix|chore)/.test(header); // Например, если тип "fix" или "chore"
if (isPatch) {
console.log('Обновление версии патча...');
execSync('cd src/front && npm version patch', { stdio: 'inherit' });
}
} }
return [true]; return [true];
}, },