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

Use version from annotated tag #1

Closed
mockitoguy opened this issue Feb 15, 2020 · 4 comments · Fixed by #76
Closed

Use version from annotated tag #1

mockitoguy opened this issue Feb 15, 2020 · 4 comments · Fixed by #76
Labels
enhancement New feature or request

Comments

@mockitoguy
Copy link
Contributor

mockitoguy commented Feb 15, 2020

There are teams that prefer to cut release "on demand", rather than with every change on master (example: linkedin/li-apache-kafka-clients, mockito-kotlin). Those teams are not supported cleanly by our plugin.

Problem statement: how do we enable teams to release on demand and provide automated changelog?

❓ Options

  • a) keep shipkit-auto-version simple, let other plugins solve this use case. Problem: allegro/axion-release-plugin does not expose previous version information cleanly and it is necessary for automated changelog.
  • b) enhance shipkit-auto-version to support picking the version directly from annotated tag.

💡Solution discussion:

  • a) is preferred to keep shipkit-auto-version laser focused and reduce future maintenance. However, I was not able to cleanly enhance axion plugin to expose previous version information.
  • b) can be designed as a simple enhancement to shipkit-auto-version ⬇️

🌱 Implementation overview:

  • missing version.properties file or missing version property is allowed and signals simplified behavior of our plugin (currently, the file and property are required).
  • our plugin deducts current version this way:
    • if we checked out a tag (git checkout 1.2.3), pick that version: 1.2.3
      • To find out if git repo is checked out to a tag, we can run git describe --tags
    • if we checkout out a branch (git checkout main), pick the highest tag
    • no counting commits logic is necessary in this simplified behavior

🌎 Long term goals:

  • should we deprecate functionality ⬆️ when axion plugin supports previous version information? No. Shipkit-auto-version will continue to support the basic use case described in this ticket. We endorse axion plugin for complex use cases not supported out of the box by shipkit-auto-version. However, we encourage build experts to keep their automation simple (KISS 💋).
@mockitoguy mockitoguy added maybe Potential feature unscoped Needs scoping labels Feb 15, 2020
@mockitoguy mockitoguy changed the title Support releasing from annotated tag Use version from annotated tag Apr 10, 2021
@mockitoguy mockitoguy added enhancement New feature or request and removed maybe Potential feature unscoped Needs scoping labels Apr 10, 2021
@mockitoguy
Copy link
Contributor Author

@shestee, do you want to take a stab at it?

@shestee
Copy link
Contributor

shestee commented Apr 11, 2021

Thank you for asking. I'll check this out.

@nipafx
Copy link

nipafx commented Apr 12, 2021

Just a note:

  • missing version.properties file or missing version property is allowed and signals simplified behavior of our plugin

When I experimented with #72 I explored passing the project version via command line, which also makes version.properties superfluous, I discovered that the file is required nonetheless. This seems to contradict the docs, which say:

  • if the gradle project already has a set version (e.g. from the command line), use that version
  • if no file or wrong format fail

@mockitoguy
Copy link
Contributor Author

@nipafx, I clarified that in the description (we're changing this behavior). Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants