carbon-io / carbond

MIT License
2 stars 5 forks source link

Update all example apps in carbon-io-guides for carbon 0.7 #226

Closed willshulman closed 6 years ago

willshulman commented 7 years ago

This is also where we should start tagging the examples with the version of carbon they are compatible with. Maybe 'carbon-io-v0.7' ?

-will

tfogo commented 7 years ago

So there's an issue with using tags. Say we tag commit A on mater as '0.6' and commit B on master as '0.7'. We reference commit A in the 0.6 docs and commit B in the 0.7 docs.

But if we need to go back and update the 0.6 example for some reason... say people are still using 0.6 and there's a bug in the example... it will be a total mess.

Perhaps the best way to do this is with branches. We can checkout a v0.6 branch then merge the 0.7 changes into master. So master will be our latest version and we'll have another branch for any carbon-io version which isn't compatible.

tfogo commented 7 years ago

Also, we should put all the examples on travis so we don't break them without knowing.

tfogo commented 7 years ago

Here's the solution we just came up with. Use tags as we originally agree, and make a branch and re-tag if we need to update previous examples.

Making an update to the current version of examples

Say the latest version of carbon-io is 0.6 and breaking changes are planned in 0.7. The latest (0.6) docs reference the master branch in each example. Here are the steps to update the examples:

  1. Update the examples on a new branch

    $ git checkout -b carbon-io-v0.7
  2. Tag master as compatible with v0.6 with the carbon-io-v0.6 tag.

    $ git tag -a carbon-io-v0.6 -m "Compatible with carbon-io 0.6"
    $ git push origin carbon-io-v0.6
  3. Create a PR to merge your new branch into master.

Now the 0.7 docs will be referencing the correct branch on master, and the old 0.6 docs will reference the example at the carbon-io-v0.6 tag.

Making an update to a previous version of examples

Now if we need to update the 0.6 compatible example, follow these steps:

  1. Checkout the 0.6 compatible example and branch off of it

    $ git checkout carbon-io-v0.6
    $ git checkout -b 0.6-update
  2. Make your changes on the 0.6-update branch then move the carbon-io-v0.6 tag to that branch (notice we must use the -f force option when moving the tag)

    $ git tag -fa carbon-io-v0.6 -m "Compatible with carbon-io 0.6"
    $ git push --force --tags
tfogo commented 7 years ago

If you think this is clear, I can add this to the CONTRIBUTING.md. @willshulman any thoughts on this PR which adds the CONTRIBUTING.md? https://github.com/carbon-io/carbon-io/pull/26

tfogo commented 6 years ago

I believe only the Contact Service and Zipcode Service need to be updated for 0.7. Both now have 0.7 compatible branches.

I've tagged the current master on both as carbon-io-v0.6.

tfogo commented 6 years ago

@willshulman FYI all 0.6 compatible examples now have a tag

willshulman commented 6 years ago

@tim great! Thanks.

willshulman commented 6 years ago

@tim can you also do a pass through the gluecon presentation and point all the links at the 0.6 compat versions of the examples?

tfogo commented 6 years ago

@willshulman will do

tfogo commented 6 years ago

@willshulman, I tagged all the 0.7 compatible repos. Only one left to update is contacts-service-simple.

tfogo commented 6 years ago

Note: make sure to update in docs

tfogo commented 6 years ago

All the examples now have branches for 0.6 and 0.7. Here are the PRs that need to be merged (ticked once done):

willshulman commented 6 years ago

@tfogo how are we on this. can we close or do you just need me to accept the above PRs?

tfogo commented 6 years ago

@willshulman just need you to accept those PRs and we're done