我有一個CI 2.0項目在VCS瓦特/回購託管在我的服務器上。目前我有一個bash腳本,我已經在下面發佈。它檢出源代碼,移動一些文件,並重新啓動服務器以反映更新的網站。Codeigniter部署過程
w /我現在的方法有什麼問題嗎?還有其他人對我可以使用的其他工具有什麼其他建議嗎?或者有其他方法可以做得更好?謝謝!
# Stop apache while we update the server, and export our svn repo to a tmp dir
sudo /etc/init.d/apache2 stop
svn export file:///home/steve/repository/example/trunk /home/steve/example_dev/
# Prepare the public_html folder for the update, and remove the tmp directory
rm -rf /home/steve/public_html/example.com/public/
mv /home/steve/example_dev/ /home/steve/public_html/example.com/public/
rm -rf /home/steve/public_html/example.com/public/license.txt
rm -rf /home/steve/public_html/example.com/public/user_guide
rm -rf /home/steve/example_dev
# Restart apache
sudo /etc/init.d/apache2 start
我使用http://docs.fabfile.org/en/1.2.2/index.html – Vamsi