-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: Fixed compatibility with SlikSVN #397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 61.94% 61.95% +0.01%
==========================================
Files 170 170
Lines 7182 7184 +2
Branches 1359 1359
==========================================
+ Hits 4449 4451 +2
Misses 2729 2729
Partials 4 4
Continue to review full report at Codecov.
|
@@ -112,9 +112,11 @@ export class SvnFinder { | |||
|
|||
public checkSvnVersion(svn: ISvn): Promise<ISvn> { | |||
return new Promise<ISvn>((c, e) => { | |||
if (!semver.valid(svn.version)) { | |||
// fix compatibility with SlickSVN (like 1.6.17-SlikSvn-tag-1.6.17@1130898-X64) | |||
const version = svn.version.replace(/^(\d+\.\d+\.\d+).*/, "$1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the .*
needed for? ^(\d+\.\d+\.\d+)
gets the version alone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fast version instead of match or exec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
I use replace for single code: ...
let version = svn.version;
const match = /^(\d+\.\d+\.\d+)/.exec(svn.version);
if (match && match[0]) {
version = match[0]
}
... |
## [1.44.4](v1.44.3...v1.44.4) (2018-10-26) ### Bug Fixes * Fixed compatibility with SlikSVN ([#397](#397)) ([21b4f6d](21b4f6d))
🎉 This PR is included in version 1.44.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.