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

Fix incrementation of alpha, beta and rc preversion variable in cases if there are pre already. #5

Conversation

DRITE
Copy link

@DRITE DRITE commented Jun 26, 2020

This PR fixes issue #4

Provides next logic:

  1. IF there is no $preversion, THEN preversion=0
  2. ELSE IF pre != "-alpha", THEN preversion=1 (same as before)
  3. ELSE increment preversion

The same for beta and rc.

Here some tests results:

bash entrypoint.sh 1.15.0-beta1 alpha
create alpha-release version: 1.15.0-beta1 -> 1.15.0-alpha1
bash entrypoint.sh 1.15.0-beta1 beta
create beta-release version: 1.15.0-beta1 -> 1.15.0-beta2
bash entrypoint.sh 1.15.0-alpha22 alpha
create alpha-release version: 1.15.0-alpha22 -> 1.15.0-alpha23
bash entrypoint.sh 1.15.0 rc
create rc-release version: 1.15.0 -> 1.15.0-rc0

@christian-draeger christian-draeger merged commit 9d04121 into christian-draeger:master Jul 12, 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