lucidnz / bootstrapify-1

An open-source base theme for Shopify using Twitter Bootstrap
http://bootstrapify-theme.myshopify.com/
187 stars 72 forks source link

Collaboration workflow with Bootstrapify #216

Closed ajmalafif closed 9 years ago

ajmalafif commented 9 years ago

Hey all,

I'm just curious what's the workflow that everyone's using for say, a team of 2 - 3 people working on the same bootstrapify codebase. Does everyone works independently on their own dev site and re-install the theme on live site?

For us we use a staging theme_id and preview them while working on a feature (which usually on other branch) and then for live we use master.

Then we thought might as well each one of us working on our own theme_id regardless of branches, and again keep master as clean as possible and use it for live.

If anyone have better suggestion for the workflow, please do share down below. Thanks!

gavinballard commented 9 years ago

Hey Ajmal, what you describe is pretty close to how I've worked with multiple collaborators on a single theme. Live site on the master branch, then one dev store per development branch.

I use a post-checkout Git hook to automatically switch over the :theme_id: in my config.yml when switching branches - you can check that out here if you're interested.

You might also be interested in this writeup by @tyler-king on development workflow for teams.

stewartknapman commented 9 years ago

Hi @ajmalafif, That is pretty much how we do it here.

We would each have a separate theme on a store that is previewed. Any new features are done as a pull request to the git repo and one person would be in charge of merging it into master and pushing it to the live theme on the store.

ajmalafif commented 9 years ago

Hey @gavinballard,

Never cross my mind that this can be automated with git hook! I never use it before so went and did some Googling, I learn that I can put it inside the repo I'm working on but where do I put the alternate config.yml though?

I'm thinking of writing down a more detailed walkthrough for this specific setup of yours for first timers like myself.

Thanks again for sharing!

ajmalafif commented 9 years ago

@stewartknapman

Yeah that's exactly how we do it. But how do you all deal with theme watch while checking out say to master or other branches? Sometimes one of us made this by mistake and .....

Thanks for sharing, really appreciate it!

stewartknapman commented 9 years ago

@ajmalafif we learnt that the hard way. We just have to be aware of what branches you are merging where. Currently Im cleaning out some random client stuff that I accedently merged into master.

gavinballard commented 9 years ago

@ajmalafif I only have one config.yml which is not checked in to Git. I just add key-value pairs, one for each branch I’m working with and the associated theme ID. I’m writing this via email, so not sure if the formatting will come through, but my config.yml looks something like this:

---
:api_key: abcdef0123456789abcdef0123456789
:password: abcdef0123456789abcdef0123456789
:store: example.myshopify.com
:theme_id: 5500001
:master: 5500001
:sandbox: 5500002

Where I have two branches, master and sandbox, with theme IDs of 5500001 and 5500002 respectively.

ajmalafif commented 9 years ago

@gavinballard

Sorry I just gave it a tried but it seems I can't get it to work. I think I'm supposed to turn off the theme watch instead of kept it running all the time.

But thanks for the reply that's really helpful. I think from here I can experiment and see how to make it works as intended. Thanks again!

gavinballard commented 9 years ago

@ajmalafif Yes, unfortunately (or rather, sensibly) you need to re-boot any theme watch processes as the changes to the config.yml won't be picked up. No worries, good luck with it.

ajmalafif commented 9 years ago

@gavinballard

Aha, I see. Thanks for being responsive and helpful.

ajmalafif commented 9 years ago

Btw figured that it was my ruby setup that didn't run the hook. So the solution to it was I have to do this:

https://github.com/wayneeseguin/rvm/issues/2347#issuecomment-28716030

And then, use the exact code shared by @gavinballard but only replacing the first line with:

#!/usr/bin/env ruby-rvm-env 1.9.3

https://gist.github.com/ajmalafif/dd5877e0d46838432273