allegro / allegro/axion-release-plugin

deserializer method is not invoking in GitHub Runner, failed to set Version

Abierto
#775 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Groovy
Estrellas
641
Forks
165
Merge medio
49 min
PR fusionados (30 d)
9

Descripción

Here is the snippet of the code.

I have a GitHub Runner node, where fetching git tags are not supported, so I set **initial Version** by passing groovy command line property.

Below code works in my local Windows, but not in the Runner as if like not there. It's always taking default version **0.1.0-SNAPSHOT**

axion-release-plugin versions using are: **1.15.3 and 1.17.2**

```groovy
scmVersion {
tag {
prefix = "v"
deserializer({ tagProperties,scmPosition,String ->
if(project.hasProperty('gitTag')){
project.gitTag.substring(1)
}else{
'0.0.1'
}

})
}
snapshotCreator({versionFromTag,scmPosition ->
if(scmPosition.branch == 'main'){
''
}else if (scmPosition.branch == 'dev'){
'-SNAPSHOT'
}else {
''
}
})
def incrementerType = project.findProperty('incrementerType') ?: 'incrementMinor'

branchVersionIncrementer.putAll([
'dev':incrementerType
])
}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.