通过批处理脚本更新多个heroku应用程序

时间:2012-07-29 18:43:46

标签: windows git heroku batch-file

我有近30个heroku应用程序,我想通过1次点击更新它们。我只做了一个简单的批次,但在第一行没问题后它没有关注第二行

cd C:\Users\Ofis\heroku\app1 && up.bat
cd C:\Users\Ofis\heroku\app2 && up.bat
cd C:\Users\Ofis\heroku\app3 && up.bat
cd C:\Users\Ofis\heroku\app4 && up.bat
cd C:\Users\Ofis\heroku\app5 && up.bat
cd C:\Users\Ofis\heroku\app6 && up.bat

up.bat =

git add .
git commit -m "update"
git push heroku master

1 个答案:

答案 0 :(得分:1)

如果要调用子脚本并在完成后返回主脚本,则需要使用call

cd C:\Users\Ofis\heroku\app1 && call up.bat
cd C:\Users\Ofis\heroku\app2 && call up.bat