This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: #655. PR URL: #657.
- Loading branch information
Showing
6 changed files
with
65 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,27 @@ | ||
var semver = require('semver'), | ||
runtimeVersion = semver.parse(process.version), | ||
runtime = runtimeVersion.major < 1 ? 'node' : 'iojs'; | ||
|
||
/** | ||
* Get Runtime Name | ||
* | ||
* @api private | ||
*/ | ||
|
||
function getRuntimeName() { | ||
return process.execPath.split(/[\\/]+/).pop(); | ||
} | ||
|
||
/** | ||
* 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
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,27 @@ | ||
var semver = require('semver'), | ||
runtimeVersion = semver.parse(process.version), | ||
runtime = runtimeVersion.major < 1 ? 'node' : 'iojs'; | ||
|
||
/** | ||
* Get Runtime Name | ||
* | ||
* @api private | ||
*/ | ||
|
||
function getRuntimeName() { | ||
return process.execPath.split(/[\\/]+/).pop(); | ||
} | ||
|
||
/** | ||
* Get unique name of binary for current platform | ||
* | ||
* @api public | ||
*/ | ||
|
||
module.exports.getBinaryIdentifiableName = function() { | ||
return process.platform + '-' + | ||
process.arch + '-' + | ||
getRuntimeName() + '-' + | ||
runtimeVersion.major + '.' + | ||
runtimeVersion.minor; | ||
} |