chore [P-137]: test

This commit is contained in:
Nukeap committed 2025-02-06 10:31:24 +03:00
1 parent 78c43e7c71
commit def2146aa8
5 files changed
+4 -34

No files matched your search

File renamed without changes.
-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' });
}
}
-19
View File
@@ -1,4 +1,3 @@
import { execSync } from 'child_process';
export default {
rules: {
'header-max-length': [2, 'always', 72], // Максимальная длина заголовка
@@ -28,24 +27,6 @@ export default {
Например: feat [X-01]: я тут накоммитил`,
];
} else {
const isPatch = /^(fix|chore)/.test(header); // Например, если тип "fix" или "chore"
const command = {
feat: 'patch',
fix: 'patch',
docs: 'patch',
style: 'patch',
refactor: 'patch',
perf: 'patch',
test: 'patch',
chore: 'patch',
};
console.log(command);
if (isPatch) {
console.log('Обновление версии патча...');
execSync('cd src/front && npm version patch', { stdio: 'inherit' });
}
}
return [true];
},
+1 -1
View File
@@ -10,7 +10,7 @@ export default [
pluginJs.configs.recommended,
...pluginVue.configs["flat/essential"],
{rules: {
'no-console': 'warn',
'no-console': 'error',
}}
];
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
npm run commitlint --edit ${1}