chore: autocommit
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import { readFileSync, writeFileSync } from "fs"
|
import { readFileSync, writeFileSync } from "fs"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
|
import { commitTheme } from "./change-theme"
|
||||||
|
|
||||||
// Chemins vers les fichiers
|
// Chemins vers les fichiers
|
||||||
const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts")
|
const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts")
|
||||||
@@ -41,4 +42,7 @@ appCssContent = appCssContent.replace(
|
|||||||
)
|
)
|
||||||
writeFileSync(appCssPath, appCssContent)
|
writeFileSync(appCssPath, appCssContent)
|
||||||
|
|
||||||
|
commitTheme(mode, newTheme)
|
||||||
|
|
||||||
console.log(`Thème ${mode} mis à jour avec succès vers: ${newTheme}`)
|
console.log(`Thème ${mode} mis à jour avec succès vers: ${newTheme}`)
|
||||||
|
process.exit(0)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import { readFileSync, writeFileSync } from "fs"
|
import { readFileSync, writeFileSync } from "fs"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
|
import { commitTheme } from "./change-theme"
|
||||||
|
|
||||||
// Chemins vers les fichiers
|
// Chemins vers les fichiers
|
||||||
const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts")
|
const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts")
|
||||||
@@ -50,4 +51,7 @@ appCssContent = appCssContent.replace(
|
|||||||
)
|
)
|
||||||
writeFileSync(appCssPath, appCssContent)
|
writeFileSync(appCssPath, appCssContent)
|
||||||
|
|
||||||
|
commitTheme(mode, newTheme)
|
||||||
|
|
||||||
console.log(`Thème ${mode} mis à jour avec succès vers: ${newTheme}`)
|
console.log(`Thème ${mode} mis à jour avec succès vers: ${newTheme}`)
|
||||||
|
process.exit(0)
|
||||||
|
|||||||
18
_scripts/change-theme.ts
Normal file
18
_scripts/change-theme.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { execSync } from "child_process"
|
||||||
|
|
||||||
|
export const commitTheme = (mode: string, newTheme: string) => {
|
||||||
|
// Créer un commit avec les changements
|
||||||
|
try {
|
||||||
|
// Ajouter tous les fichiers modifiés
|
||||||
|
execSync("git add .", { stdio: "inherit" })
|
||||||
|
|
||||||
|
// Créer le commit avec le message approprié
|
||||||
|
const commitMessage = `design: change ${mode} theme to ${newTheme}`
|
||||||
|
execSync(`git commit -m "${commitMessage}"`, { stdio: "inherit" })
|
||||||
|
|
||||||
|
console.log(`Commit créé avec succès: "${commitMessage}"`)
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Erreur lors de la création du commit:", error)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user