Skip to content

Support manual versioning by avoiding relying on git tags #32

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

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Jun 23, 2022

Description

Currently, this plugin is setup in a way where it always calculates the version based on the current Git tag. If you haven't checked out that tag, it will produce a SNAPSHOT set of jars.

With our new way of releasing SDKs using Ship CLI and Circle CI's Ship Orb, we need to modify the process a bit.

Projects should contain their own version property, which will be bumped by the Ship CLI, which then will be published by the Ship Orb.

To support that, we need to avoid using Semver.current() in the above use-case, which typically is when an explicit version is defined. Instead, we use the Semver constructor which takes the version and a boolean indicating whether or not it's a snapshot.

We will default to using a snapshot, avoiding the need to provide any arguments when building a SNAPSHOT. If you dont want to build a snapshot, the isSnapshot value needs to be set to false, which we will do in the Orb by passing -PisSnapshot to the Gradle CLI.

We are using a global project property because it seems that Library properties (defined on the plugin's Library class) are not initialized when running the plugins apply method.

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@frederikprijck frederikprijck added the CH: Added PR is adding feature or functionality label Jun 24, 2022
@frederikprijck frederikprijck merged commit 4e8f046 into master Jun 24, 2022
@frederikprijck frederikprijck deleted the feat/opt-out-semver branch June 24, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants