Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rocketmake-semver

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rocketmake-semver - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

61

index.js

@@ -6,23 +6,35 @@ var Promise = require("bluebird");

var padZeroes = function pad(num) {
var s = "00000" + num;
return s.substr(s.length-5);
}
module.exports = function(buildType){
switch(buildType){
case 'prod':
return getVersionFromLastTag().then(function(num) {
return {
semver: num,
dotnetversion: num + '.0',
mobileversion: num
};
return getVersionFromLastTag().then(function(version) {
return getCommitsSinceRootTag().then(function(commitsSinceRoot) {
return {
semver: version,
dotnetversion: version + '.0',
mobileversion: version,
commitCountVersion: commitsSinceRoot
};
});
});
case 'test':
return getNextVersionFromBranchName().then(function(num) {
return getCommitsSinceLastTag().then(function(sub) {
return {
semver: num + '-test-' + sub,
dotnetversion: num + '.' + sub,
mobileversion: num
};
return getNextVersionFromBranchName().then(function(version) {
return getCommitsSinceLastTag().then(function(commitsSinceLastTag) {
return getCommitsSinceRootTag().then(function(commitsSinceRoot) {
return {
semver: version + '-test-' + padZeroes(commitsSinceLastTag),
dotnetversion: version + '.' + commitsSinceLastTag,
mobileversion: version,
commitCountVersion: commitsSinceRoot
};
});
});

@@ -34,7 +46,8 @@ });

case 'demo':
return getCommitsSinceRootTag().then(function(sub) {
return getCommitsSinceRootTag().then(function(commitsSinceRoot) {
return {
semver: '0.0.0-' + buildType + '-' + sub,
dotnetversion: '0.0.0.' + sub,
mobileversion: '0.0.0'
semver: '0.0.0-' + buildType + '-' + padZeroes(commitsSinceRoot),
dotnetversion: '0.0.0.' + commitsSinceRoot,
mobileversion: '0.0.0',
commitCountVersion: commitsSinceRoot
};

@@ -46,8 +59,10 @@ });

_v = incrementPatchNumber(num);
return {
semver: _v + '-local-' + Date.now(),
dotnetversion: _v + '.0',
mobileversion: _v
};
return getCommitsSinceRootTag().then(function(commitsSinceRoot) {
return {
semver: _v + '-local-' + Date.now(),
dotnetversion: _v + '.0',
mobileversion: _v,
commitCountVersion: commitsSinceRoot
};
});
});

@@ -54,0 +69,0 @@

{
"name": "rocketmake-semver",
"version": "0.2.0",
"version": "0.3.0",
"dependencies": {

@@ -5,0 +5,0 @@ "bluebird": "^2.9.25",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc