mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-12-20 03:52:19 -06:00
doc and other commands
This commit is contained in:
14
lib/utils/revertToVersion.js
Normal file
14
lib/utils/revertToVersion.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const { exec } = require('child_process')
|
||||
|
||||
module.exports = (version) => {
|
||||
return new Promise((resolve) => {
|
||||
exec(`git fetch --all && git reset --hard ${version}`, (err, stdout) => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
return resolve(false)
|
||||
}
|
||||
console.log(stdout)
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user