将 Mercurial 更改部署到网站托管帐户
我只想使用 SSH 或 FTP 将自发布修订版以来更改的网站文件移至托管帐户。托管帐户基于 Linux,但确实安装了任何版本控制,因此我不能简单地在那里进行更新,并且该解决方案必须在本地开发计算机上运行。
我本质上是在尝试做 http://www.deployhq.com/ 所做的事情,但是免费。我想发布更改,而无需重新上传所有内容或手动选择要移动的文件。我愿意简单地使用 bash 脚本来比较版本并复制每个文件(如何?用 bash 不太好),因为我们将使用 Linux 进行开发,但带有 Web 界面的东西会更好。
预先感谢您的帮助!
I want to move only the website files changed since the published revision to a hosting account using SSH or FTP. The hosting account is Linux based but does have have any version control installed, so I can't simply do an update there, and the solution must run on the local development machines.
I'm essentially trying to do what http://www.deployhq.com/ does, but for free. I want to publish changes without having to re-upload everything or manually choose the files to move. I'm open to simply using a bash script that compares versions and copies each file (how? not that great with bash) since we'll be using Linux for development, but something with a web interface would be nice.
Thanks in advance for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来更像是 rsync 的工作,而不是 hg 的工作,因为该目标没有安装了汞。
像这样:
这将从.../local/files/ 递归地(-r)传输所有文件并将它们放在/remote/path 中。 -az 压缩并保留文件属性。
rsync 只负责传输已更改的文件。指定源路径时,请务必注意尾随斜线,它们很重要(请参阅上面的链接)。
This seems more like a job for rsync than one for hg, given that that target doesn't have hg installed.
Something like so:
This would transfer all files, recursively (-r), from .../local/files/ and place them in /remote/path. The -az compresses and perserves file attributes.
rsync takes care of only transferring files that have changed. Be sure to watch for trailing slashed when specifying source paths, they matter (see the link above).