allegro / allegro/axion-release-plugin
Cannot add branchName into git tag
- Langage dominant
- Groovy
- Étoiles
- 641
- Forks
- 165
- Merge moyen
- 49 min
- PR mergées (30 j)
- 9
Description
Hello!
We have used the plugin for some time with success, however had many issues with **git tags** when two developers were creating two feature branches from master and then having a build in similar time. Task 'release' fails because git tags are having the same name. Therefore, we wanted to add branch name into "tag" block, but there is no explicit option. Implementing serializer and deserializer handles the thing, however the solution is not elegant.
```
scmVersion {
tag {
prefix = 'prefix'
versionSeparator = '-'
serialize = { config, version ->
if (scmPosition.branch != 'master' && scmPosition.branch != 'HEAD') {
return prefix + versionSeparator + version + versionSeparator + scmPosition.branch
} else {
return prefix + versionSeparator + version
}
}
deserialize = { config, position, tagName ->
return tagName.substring(config.prefix.length() + config.versionSeparator.length())
}
}
branchVersionIncrementer = [
'master': 'incrementMinor',
'.*' : 'incrementPatch'
]
}
```
Would you care to create a method that adds git branchName into tag? or point me to the best class where I can create PR?
Thanks!
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.