Created
October 24, 2019 16:08
-
-
Save wgbn/f4335ffd10eb7e017c2eaad549e982cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const prompt = require("prompt"); | |
| const { exec } = require('child_process'); | |
| prompt.start(); | |
| console.log('Digite a versão do commit:'); | |
| prompt.get(['version'], function (erro, result) { | |
| if (erro) return; | |
| const hoje = new Date(); | |
| exec(`git add www -f && git commit -m build-${hoje.getFullYear()}${hoje.getMonth()+1}${hoje.getDate()}-${result.version || ''} && git push deploy`, (err, stdout, stderr) => { | |
| if (err) return; | |
| console.log(stdout); | |
| console.log(`stderr: ${stderr}`); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment