-
Notifications
You must be signed in to change notification settings - Fork 63
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
No tags are present for this repository #117
Comments
There is a new feature in v5.2.1 which I haven't had time yet to document properly, but if you set the
I may add a redaction option in the future to do this automatically, but in the meantime have a look at the output first and make sure you're comfortable posting it, feel free to change the author names/emails for example if they are not public. |
Same issue for me
but the expected version is Here is my debug output
I tested 5.2.0, 5.2.0, 5.1.0, 5.0.3, 5.0.2, 5.0.1, and 5.0.0 - same warning for all these versions. The last working version for me is 4.0.3 (I don't know if there are any versions between 4.0.3 and 5.0.0 |
tl;dr You need to use a tag format that matches the configuration you have, in your case it looks like that's This command is being used to identify the last version tag:
This list is then filtered to find the first suitable tag that matches the expected pattern using public IsValid(tag: string): boolean {
const regexEscape = (literal: string) => literal.replace(/\W/g, '\\$&');
const tagPrefix = regexEscape(this.tagPrefix);
const namespaceSeperator = regexEscape(this.namespaceSeperator);
const namespace = regexEscape(this.namespace);
if (!!this.namespace) {
return new RegExp(`^${tagPrefix}[0-9]+\.[0-9]+\.[0-9]+${namespaceSeperator}${namespace}$`).test(tag);
}
return new RegExp(`^${tagPrefix}[0-9]+\.[0-9]+\.[0-9]+$`).test(tag);
} So as you can see, if you don't have a namespace set it is checking for the version prefix (almost always either Now the result we see for this command in the diagnostic output above is:
All of these are using 4 number versions, so all will be rejected, leaving you with no valid tags present. This action assigns the "increment" value itself which can be optionally used by you however you like in the build, but this value is not part of the semantic version spec and is not supported as an input. The reason this may have worked previously is because in previous versions the action relied solely on the git command to return the version. Ideally we would not need to run the command with the filter and then immediately filter the result as we are, but unfortunately the glob pattern supported by Git is not as robust as regex and was including tags that should not have been included, you're seeing the point where this was fixed. I am updating the warning message to distinguish between these two cases by checking the total number of tags found and showing a warning about the format rather than saying no tags found. |
Thanks for the explanation, switching to |
Get a warning about not tags are present in this repository and the version is not picked up:
The tag listing show:
The version output is:
0.1.0-14
Expected version:
0.4.0-14
The text was updated successfully, but these errors were encountered: