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

Finding Version skips next character #2

Open
EasyAsABC123 opened this issue Mar 12, 2015 · 1 comment
Open

Finding Version skips next character #2

EasyAsABC123 opened this issue Mar 12, 2015 · 1 comment

Comments

@EasyAsABC123
Copy link

Example

Package Name: Regulated-Servicing_develop
Repository Id: Servicing
Package Path: regulated-servicing_develop
Package Id: Regulated-Servicing_develop

The real artifact name is: Regulated-Servicing_v0.10.0.1.zip
Full Path: Servicing:regulated-servicing_develop/Regulated-Servicing_v0.10.0.1.zip

If I use the above it returns v0.10.0.1
If I change Package Id: Regulated-Servicing_develop_ it returns 0.10.0.1
If I change Package Id: Regulated-Servicing_develop_v it returns .10.0.1

I don't think the above is exactly right

@varchev
Copy link
Owner

varchev commented Mar 12, 2015

You are right. The current behavior it to extract the version from the name of the artifact. The current implementation relies on the assumption that the user artifact file name would be named as follows:
package-id-as-defined-in-config-1.0.0.0.ext
In other words it relies on the fact that there the filename starts with the ID defined, followed by a single separating symbol (could be dot, dash, underscore, etc.), followed by the version and then the extension. This is was the simplest possible approach that I found suitable for the purpose. As a next step I'm thinking of introducing an optional configuration that could define a more advances setting that would allow for more formats of the file name. This could be a regular expression, that the user would enter, which will tell the poller how to extract the version from the artifact name/path.

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

2 participants