mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
chore: Initial Commit
feat: Gestion des inscriptions [#1] feat(frontend): Création des vues pour le paramétrage de l'école [#2] feat: Gestion du login [#6] fix: Correction lors de la migration des modèle [#8] feat: Révision du menu principal [#9] feat: Ajout d'un footer [#10] feat: Création des dockers compose pour les environnements de développement et de production [#12] doc(ci): Mise en place de Husky et d'un suivi de version automatique [#14]
This commit is contained in:
17
scripts/commit-template.txt
Normal file
17
scripts/commit-template.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Message de commit (conventionnel) :
|
||||
#
|
||||
# <type>(<scope>): <description> [#<ticket-id>]
|
||||
# ex : feat(frontend): ajout de la gestion des utilisateurs dans le dashboard [#1]
|
||||
#
|
||||
# Types:
|
||||
# - feat: Nouvelle fonctionnalité
|
||||
# - fix: Correction de bug
|
||||
# - docs: Documentation
|
||||
# - style: Changements esthétiques
|
||||
# - refactor: Refactorisation
|
||||
# - test: Ajout/modification de tests
|
||||
# - chore: Tâches diverses (e.g., mise à jour des dépendances)
|
||||
#
|
||||
# Scope: Optionnel (ex. backend, frontend, api, ci )
|
||||
#
|
||||
# Ticket ID: Référence à un ticket ou une issue (ex. [#123])
|
||||
30
scripts/prepare-commit-msg.js
Normal file
30
scripts/prepare-commit-msg.js
Normal file
@ -0,0 +1,30 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Fichier template
|
||||
const TEMPLATE_FILE = path.join(__dirname, './commit-template.txt');
|
||||
|
||||
// Arguments passés par Husky
|
||||
const commitMsgFile = process.argv[2];
|
||||
const commitType = process.argv[3];
|
||||
|
||||
// Vérifie si le commit est interactif
|
||||
if (commitType === 'message' || commitType === 'template') {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Vérifie si le fichier template existe
|
||||
if (fs.existsSync(TEMPLATE_FILE)) {
|
||||
try {
|
||||
// Lit le fichier template
|
||||
const templateContent = fs.readFileSync(TEMPLATE_FILE, 'utf8');
|
||||
|
||||
// Ajoute le contenu du template au message de commit
|
||||
fs.appendFileSync(commitMsgFile, `\n${templateContent}`);
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la modification du message de commit :', error);
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
console.warn(`Fichier template introuvable : ${TEMPLATE_FILE}`);
|
||||
}
|
||||
26
scripts/update-version.js
Normal file
26
scripts/update-version.js
Normal file
@ -0,0 +1,26 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Chemins vers les fichiers
|
||||
const rootPackageJsonPath = path.resolve(__dirname, '../package.json');
|
||||
const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf8'));
|
||||
// Lire la version actuelle du package.json principal
|
||||
const newVersion = rootPackageJson.version;
|
||||
|
||||
|
||||
const frontendPackageJsonPath = path.resolve(__dirname, '../Front-End/package.json');
|
||||
// Lire et mettre à jour le package.json du sous-module
|
||||
const frontendPackageJson = JSON.parse(fs.readFileSync(frontendPackageJsonPath, 'utf8'));
|
||||
frontendPackageJson.version = newVersion;
|
||||
// Écrire les changements dans le fichier frontend/package.json
|
||||
fs.writeFileSync(frontendPackageJsonPath, JSON.stringify(frontendPackageJson, null, 2), 'utf8');
|
||||
console.log(`Version mise à jour dans frontend/package.json : ${newVersion}`);
|
||||
|
||||
// Chemin vers le fichier Python de version
|
||||
const versionFilePath = path.resolve(__dirname, '../Back-End/__version__.py');
|
||||
|
||||
// Mettre à jour le fichier Python
|
||||
const versionContent = `__version__ = "${newVersion}"\n`;
|
||||
fs.writeFileSync(versionFilePath, versionContent, 'utf8');
|
||||
|
||||
console.log(`Version du backend mise à jour dans ${versionFilePath} : ${newVersion}`);
|
||||
Reference in New Issue
Block a user