Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 95c2e16

Browse files
author
axelrindle
committed
Fixed removing all dots from the remote version string.
1 parent ab49aa9 commit 95c2e16

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/main.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = (options, callback) ->
3636
# if a remote version is higher than the installed one, the callback
3737
# will be called with the release object
3838
for release in releases
39-
tag = release.tag_name.replace(/\D/g, '')
39+
tag = release.tag_name.replace(/[^0-9$.,]/g, '')
4040
if semcmp(currentVersion, tag) is -1
4141
found = true
4242
callback release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-version-checker",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Version checker working with GitHub releases.",
55
"main": "index.js",
66
"scripts": {

test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const currentVersion = require('./package.json').version;
1212

1313
// version check options
1414
const options = {
15-
repo: 'axelrindle/boilernode', // the GitHub repo (required)
15+
repo: 'axelrindle/github-version-checker', // the GitHub repo (required)
1616
currentVersion: currentVersion // your app's current version (required)
1717
};
1818
versionCheck(options, function (update) {
@@ -28,5 +28,7 @@ versionCheck(options, function (update) {
2828
console.log('');
2929
console.log('------------------------------------------------------------');
3030
console.log('');
31+
} else {
32+
console.log('No updates found.');
3133
}
3234
});

0 commit comments

Comments
 (0)