How to deploy only select files through BitBucket

2

I'm hosting a small php-based website through Bitbucket. I have some files under version control that I don't want to deploy in production (helpful scripts, .xcf files, etc). Is there some way to just send the files I want to the production server?

AaronM

Posted 2011-08-09T04:46:20.967

Reputation: 133

Answers

3

No, you cannot make Mercurial send only some files. By "send", I guess you mean hg pull or maybe wget https://bitbucket.org/<user>/<repo>/get/default.zip.

The normal way to solve this is to make a dedicated script for deployment. Something like:

cd repo
hg pull
hg archive -r production -X util -X imgs/*.xcf site
rsync -av site server:public_html

where I'm imagining that you have a named branch called production that you want to publish to the server.

Martin Geisler

Posted 2011-08-09T04:46:20.967

Reputation: 534