Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semver releases #35

Merged
merged 4 commits into from
Sep 4, 2020
Merged

Semver releases #35

merged 4 commits into from
Sep 4, 2020

Conversation

flowrean
Copy link
Contributor

@flowrean flowrean commented Sep 1, 2020

Improving the release practice, as proposed in #31. Semantic versioning is introduced, or at least support for it, as outlined in DEV.md. There are also other related changes.
Here's what I would like to draw attention to (each in its own commit):

  • I first removed the go.mod and go.sum files in the subdirectories (porting their content to the remaining go.mod) so the repository now coincides with its single module. It is strongly discouraged to have multi-module repositories. I'm not sure why multiple modules were originally introduced, but this situation made it difficult to work with semver and Git tags, more precisely, the main module importing the other modules and having to update their versions in the main go.mod with every new release. I've done this with care, keeping the dependencies as they were (with the below exception) and checking that the build and tests still succeed. It looks to me like it's OK to do this, as import paths will still work and we were not yet at v1.
  • The recently added sprig was upgraded to the latest major version (v3) which further simplified go.mod. Actually it should have been at v3 to start with, but this was not the case because /v3 hadn't been appended to the import path. Now the correct versions of the indirect dependencies are used too. This change is quite safe, as we only use one function from that repo, but I tested it anyway with the example from the README.
  • I let the pre-commit hook also run go mod tidy.
  • For actually using semver releases, I removed/updated all references to the latest tag and also deleted the VERSION file. As detailed in DEV.md, a release can be made by just adding a semver tag to the latest commit, using make dist as before to cross-compile (which takes the version from the tag) and creating a new release in GitHub, selecting the same tag. I already tested this flow on my fork to create a new release.

@aotimme, does this fit with what you had in mind? Edits are of course welcome or a different approach could be considered altogether.

@aotimme
Copy link
Owner

aotimme commented Sep 4, 2020

This looks great to me! I'll merge this and then create a v1.0.0 release. And thank you for the extra clean-up.

@aotimme aotimme merged commit ab0261b into aotimme:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants