Closed willshulman closed 6 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.
Also, we should put all the examples on travis so we don't break them without knowing.
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.
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:
Update the examples on a new branch
$ git checkout -b carbon-io-v0.7
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
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.
Now if we need to update the 0.6 compatible example, follow these steps:
Checkout the 0.6 compatible example and branch off of it
$ git checkout carbon-io-v0.6
$ git checkout -b 0.6-update
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
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
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
.
@willshulman FYI all 0.6 compatible examples now have a tag
@tim great! Thanks.
@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?
@willshulman will do
@willshulman, I tagged all the 0.7 compatible repos. Only one left to update is contacts-service-simple.
Note: make sure to update in docs
All the examples now have branches for 0.6 and 0.7. Here are the PRs that need to be merged (ticked once done):
@tfogo how are we on this. can we close or do you just need me to accept the above PRs?
@willshulman just need you to accept those PRs and we're done
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