Skip to content

Commit

Permalink
updates for Mac OS 10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fscherwi committed Oct 31, 2016
1 parent 3d782d1 commit 6cc4ff4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# get-osx-version
[![Build Status](https://travis-ci.org/fscherwi/get-osx-version.svg?branch=master)](https://travis-ci.org/fscherwi/get-osx-version) [![Coverage Status](https://coveralls.io/repos/fscherwi/get-osx-version/badge.svg?branch=master&service=github)](https://coveralls.io/github/fscherwi/get-osx-version?branch=master) [![bitHound Overalll Score](https://www.bithound.io/github/fscherwi/get-osx-version/badges/score.svg)](https://www.bithound.io/github/fscherwi/get-osx-version)

## Get the OS X versions from the running system!
## Get the Mac OS versions from the running system!
# Example script
Output your current OSX version!
Output your current Mac OS version!

```js
var osx_version = require('get-osx-version').get();
var mac_os_version = require('get-osx-version').get();

console.log('OSX version: ' + osx_version);
console.log('Mac OS version: ' + mac_os_version);
```
2 changes: 1 addition & 1 deletion bin.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
console.log('\nOSX version: %s\n', require('./main.js').get());
console.log('\nMac OS version: %s\n', require('./main.js').get());
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ exports.get = function get() { /* istanbul ignore next */
case 1.4:
return "10.1";
default:
return "10." + (release - 4);
return "10." + Number((release - 4).toFixed(1));
}
} else {
return 'no OSX system';
return 'no Mac OS system';
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-osx-version",
"version": "1.3.2",
"version": "1.4.0",
"description": "small and tiny program to get your current OS X version",
"main": "main.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var osx_version = require('./main.js').get(); /* istanbul ignore next */
var mac_os_version = require('./main.js').get(); /* istanbul ignore next */
if (process.platform !== 'darwin') {
if (osx_version !== 'no OSX system') {
if (mac_os_version !== 'no Mac OS system') {
console.log('ERROR');
process.exit(1);
}
}
console.log('\nOSX version: %s\n', osx_version);
console.log('\nMac OS version: %s\n', mac_os_version);

0 comments on commit 6cc4ff4

Please sign in to comment.