mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
chore: Application du linter
This commit is contained in:
@ -1,26 +1,39 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
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'));
|
||||
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');
|
||||
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'));
|
||||
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');
|
||||
fs.writeFileSync(
|
||||
frontendPackageJsonPath,
|
||||
JSON.stringify(frontendPackageJson, null, 2),
|
||||
"utf8"
|
||||
);
|
||||
// eslint-disable-next-line no-console
|
||||
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');
|
||||
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}`);
|
||||
fs.writeFileSync(versionFilePath, versionContent, "utf8");
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`Version du backend mise à jour dans ${versionFilePath} : ${newVersion}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user