forked from sass/node-sass
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: Produces identifiable binary name.
The new format is: {platform}-{arch}-{runtime}-{major.minor} where major and minor version belong to the runtime. Related Issue: sass#655. PR URL: sass#657.
- Loading branch information
Showing
5 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var semver = require('semver'), | ||
runtimeVersion = semver.parse(process.version); | ||
|
||
/** | ||
* Get Runtime Name | ||
* | ||
* @api private | ||
*/ | ||
|
||
function getRuntimeName() { | ||
return process.execPath | ||
.split(/[\\/]+/).pop() | ||
.split('.')[0]; | ||
} | ||
|
||
/** | ||
* Get unique name of binary for current platform | ||
* | ||
* @api public | ||
*/ | ||
|
||
module.exports.getBinaryIdentifiableName = function() { | ||
return process.platform + '-' + | ||
process.arch + '-' + | ||
getRuntimeName() + '-' + | ||
runtimeVersion.major + '.' + | ||
runtimeVersion.minor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters