โ ๏ธ Alpha Version: This is an alpha version of module
Run commands on update notifications to update modules.
Minimal node version requirement: v18
cd ~/MagicMirror/modules
git clone https://github.com/samy-blake/MMM-UpdateExec
This module is build on top of the updatenotification (MagicMirrorDocs) module and use this UPDATE
broadcast notification.
{
module: "updatenotification",
position: "top_bar",
config: {
sendUpdatesNotifications: true // <-- this is important
}
},
//[...]
{
module: "MMM-UpdateExec",
position: 'top_bar',
config: {
preCmd: ["source ~/.profile"],
defaultCmd: ["git reset --hard", "git pull", "npm ci"],
customExecs: {
"MMM-Pir": [ // Modulname
"npm run update" // cmd
],
}
}
}
Parameter | Description | Type | Default |
---|---|---|---|
preCmd | Command that run global before all other Cmds | string[] | ["source ~/.profile"] |
defaultCmd | Command that run in the Modul directory | string[] | ["git reset --hard", "git pull", "npm ci]" |
customExecs | Custom command for specific module | { moduleCmd } | ["git reset --hard", "git pull", "npm ci]" |
All commands a joined by ' && '
.
customExecs: {
[moduleName: string]: string[];
}
only pull from main
git pull