dev-handbook icon indicating copy to clipboard operation
dev-handbook copied to clipboard

Versioning guide

Open jonahkagan opened this issue 10 years ago • 12 comments

Should cover:

  • why version?
  • semver!!!
  • bump version each time you deploy
  • tips by language (e.g. for node, use npm version)

Questions:

  • Should we dictate a convention about making separate commits for a version bump?
  • Should this be part of the git guide? On one hand, it is part of the workflow. On the other hand, it has to do more with deploying than source control.

jonahkagan avatar Jul 28 '14 22:07 jonahkagan

@Clever/engineers your thoughts?

jonahkagan avatar Jul 28 '14 22:07 jonahkagan

  • I lean towards not dictating this, unless you see a significant benefit. I can think of some downsides
  • I think it should be part of the git guide for now as a step to consider when making a change on a library, e.g. "describe/release your change by modifying a changelog and/or bumping a version (if these exist)." The alternative would be to assign maintainers to every repo who are in charge of releasing changes, which seems sub-optimal.

rgarcia avatar Jul 28 '14 23:07 rgarcia

I think it'd be great to revive this. Frustrating to merge to master and come back after expected build time only to find NPM/Docker deploy failed due to version collisions.

MaerF0x0 avatar Aug 12 '15 23:08 MaerF0x0

+1 to documenting this and having a process.

In order to make this more robust/automated, I'm highly in favor of Drone auto-bumping the patch version every time merge to master happens. It's safer now that we run Docker images, because consumers of the NPM package won't easily be broken by an (mistakenly) incompatible patch version.

  1. until the consumer of your NPM package builds a new docker image, it won't affect deploys -- they'll keep deploying the latest image built
  2. even if you've built a new docker image and the updated NPM package is for some reason incompatible, you can always deploy a prior docker image, with the older version of the NPM package

nathanleiby avatar Aug 12 '15 23:08 nathanleiby

Benefit is mitigating confusion/broken builds

nathanleiby avatar Aug 12 '15 23:08 nathanleiby

But auto-bumping the patch version would not be following semver, which seems like a significant downside to me

azylman avatar Aug 12 '15 23:08 azylman

can you clarify why not following? (e.g. some changes shouldn't be patches. OR might publish non-patch as patch)

nathanleiby avatar Aug 13 '15 00:08 nathanleiby

Another option: change drone logic. if NPM publish fails, don't fail the build. still build docker image

nathanleiby avatar Aug 13 '15 00:08 nathanleiby

Not all changes are patches - some are minor and some are major, so auto-patching is going to break semver

azylman avatar Aug 13 '15 00:08 azylman

My thought would be that eng is responsible for specifically changing the package.json for minor/major updates ONLY, before merging.

But true, if it's automatic, someone will probably forget and eventually a minor/major change will mistakenly get automatically published as a patch version.

nathanleiby avatar Aug 13 '15 00:08 nathanleiby

Yeah I agree with @azylman 's sentiment against auto touching the version.

MaerF0x0 avatar Aug 13 '15 19:08 MaerF0x0

FWIW, I prefer doing a version bump in the PR and not post PR. I don't it should have any particular side effects but not sure. Reason being that it seems natural include version bumps with any change. Also ensures that we can review that the version is being bumped correctly.

agclever avatar Aug 14 '15 16:08 agclever