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

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

Open
voyagerOut2009 opened this issue Jul 10, 2024 · 0 comments

Comments

@voyagerOut2009
Copy link

voyagerOut2009 commented Jul 10, 2024

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

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
    ])
}
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

No branches or pull requests

1 participant