Closed gandarez closed 3 years ago
@dron22 I changed resync
method a little bit to accomodate its behaviour in a simpler way.
resync
description in READMEhotfix
and bugfix
exclude
pattern in AncestorTag
since it was conflicting and in some cases dind't return the expected result. So I replaced by branch paramater which is saferAncestorTag
mocked func in generate_test
to return the correct ancestor tag based on branch parametergreater
and less
here are used when semver tags are compared between each other.
The following scenarios list tags in the creation orders. Tags generated from hotfix branches will be always the first ones in the list.
1st scenario - If latest tag from semver is greater than ancestor develop (prerelease) - Should generate a new develop tag v1.2.1-alpha.1
2nd scenario - If latest tag from semver is less than ancestor develop (prerelease) - Should bump build version resulting in v1.3.0-alpha.2
Question on scenario #1:
v1.2.1-alpha.1
, like you described.v1.2.1-alpha.2
.Which tag will be created in master for the new release?
Question on scenario #1:
- Let's say, resync bumps develop version to
v1.2.1-alpha.1
, like you described.- Then we merge some doc change into develop and we'll be at
v1.2.1-alpha.2
.- Then we merge develop into master.
Which tag will be created in master for the new release?
tag will be 💣 lol ... I had the same thought when developing it but I forgot about doc
and misc
prefixes. So the only way for it is to always bump patch version. I'll fix it.
@dron22 I replaced the new resync method by using the same logic as patch increment, like bugfix
. By doing in this way we won't have any problems regarding the 1st scenario you mentioned. Thanks 🙏
This PR adds a new conditional for
resync
prefix. It will allow to resync/updatedevelop
branch when a hotfix is done atmaster
. A new branch must be suffixed withresync/*
.v
as prefix for tags, semver allows to parse tolerant. So I replacedParse
byParseTolerant
. Less code :)v
all string versionsCloses https://github.com/wakatime/semver-action/issues/8