mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
dummy commit 6 MAJOR-go
This commit is contained in:
parent
7a1fdf3584
commit
69163bf56e
5 changed files with 26 additions and 145 deletions
153
dist/index.js
vendored
153
dist/index.js
vendored
|
|
@ -92,7 +92,7 @@ const JsonUserFormatter_1 = __nccwpck_require__(7892);
|
|||
const DefaultCommitsProvider_1 = __nccwpck_require__(6458);
|
||||
const DefaultCurrentCommitResolver_1 = __nccwpck_require__(35);
|
||||
const DefaultVersionClassifier_1 = __nccwpck_require__(5527);
|
||||
const DefaultLastReleaseResolver_1 = __nccwpck_require__(8337);
|
||||
const DefaultLastReleaseResolver_1 = __nccwpck_require__(2376);
|
||||
const BumpAlwaysVersionClassifier_1 = __nccwpck_require__(6482);
|
||||
const DebugManager_1 = __nccwpck_require__(1823);
|
||||
class ConfigurationProvider {
|
||||
|
|
@ -1076,113 +1076,6 @@ class DefaultCurrentCommitResolver {
|
|||
exports.DefaultCurrentCommitResolver = DefaultCurrentCommitResolver;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8337:
|
||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.DefaultLastReleaseResolver = void 0;
|
||||
const CommandRunner_1 = __nccwpck_require__(949);
|
||||
const ReleaseInformation_1 = __nccwpck_require__(1300);
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
class DefaultLastReleaseResolver {
|
||||
constructor(config) {
|
||||
this.changePath = config.changePath;
|
||||
this.useBranches = config.useBranches;
|
||||
}
|
||||
ResolveAsync(current, tagFormatter) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const releasePattern = tagFormatter.GetPattern();
|
||||
let currentTag = (yield (0, CommandRunner_1.cmd)(`git tag --points-at ${current} ${releasePattern}`)).trim();
|
||||
currentTag = tagFormatter.IsValid(currentTag) ? currentTag : '';
|
||||
const isTagged = currentTag !== '';
|
||||
const [currentMajor, currentMinor, currentPatch] = !!currentTag ? tagFormatter.Parse(currentTag) : [null, null, null];
|
||||
let tagsCount = 0;
|
||||
let tag = '';
|
||||
try {
|
||||
const refPrefixPattern = this.useBranches ? 'refs/heads/' : 'refs/tags/';
|
||||
if (!!currentTag) {
|
||||
// If we already have the current branch tagged, we are checking for the previous one
|
||||
// so that we will have an accurate increment (assuming the new tag is the expected one)
|
||||
const command = `git for-each-ref --sort=-v:*refname --format=%(refname:short) --merged=${current} ${refPrefixPattern}${releasePattern}`;
|
||||
const tags = (yield (0, CommandRunner_1.cmd)(command)).split('\n');
|
||||
tagsCount = tags.length;
|
||||
tag = tags
|
||||
.find(t => tagFormatter.IsValid(t) && t !== currentTag) || '';
|
||||
}
|
||||
else {
|
||||
const command = `git for-each-ref --sort=-v:*refname --format=%(refname:short) --merged=${current} ${refPrefixPattern}${releasePattern}`;
|
||||
const tags = (yield (0, CommandRunner_1.cmd)(command)).split('\n');
|
||||
tagsCount = tags.length;
|
||||
tag = tags
|
||||
.find(t => tagFormatter.IsValid(t)) || '';
|
||||
}
|
||||
tag = tag.trim();
|
||||
}
|
||||
catch (err) {
|
||||
tag = '';
|
||||
}
|
||||
if (tag === '') {
|
||||
if ((yield (0, CommandRunner_1.cmd)('git', 'remote')) !== '') {
|
||||
// Since there is no remote, we assume that there are no other tags to pull. In
|
||||
// practice this isn't likely to happen, but it keeps the test output from being
|
||||
// polluted with a bunch of warnings.
|
||||
if (tagsCount > 0) {
|
||||
core.warning(`None of the ${tagsCount} tags(s) found were valid version tags for the present configuration. If this is unexpected, check to ensure that the configuration is correct and matches the tag format you are using.`);
|
||||
}
|
||||
else {
|
||||
core.warning('No tags are present for this repository. If this is unexpected, check to ensure that tags have been pulled from the remote.');
|
||||
}
|
||||
}
|
||||
const [major, minor, patch] = tagFormatter.Parse('');
|
||||
// no release tags yet, use the initial commit as the root
|
||||
return new ReleaseInformation_1.ReleaseInformation(major, minor, patch, '', currentMajor, currentMinor, currentPatch, isTagged);
|
||||
}
|
||||
// parse the version tag
|
||||
const [major, minor, patch] = tagFormatter.Parse(tag);
|
||||
const root = yield (0, CommandRunner_1.cmd)('git', `merge-base`, tag, current);
|
||||
return new ReleaseInformation_1.ReleaseInformation(major, minor, patch, root.trim(), currentMajor, currentMinor, currentPatch, isTagged);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.DefaultLastReleaseResolver = DefaultLastReleaseResolver;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5527:
|
||||
|
|
@ -1329,42 +1222,6 @@ class DefaultVersionClassifier {
|
|||
exports.DefaultVersionClassifier = DefaultVersionClassifier;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1300:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ReleaseInformation = void 0;
|
||||
// Finds the hash of the last commit
|
||||
class ReleaseInformation {
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @param major - the major version number
|
||||
* @param minor - the minor version number
|
||||
* @param patch - the patch version number
|
||||
* @param hash - the hash of commit of the last release
|
||||
* @param currentMajor - the major version number from the current commit
|
||||
* @param currentMinor - the minor version number from the current commit
|
||||
* @param currentPatch - the patch version number from the current commit
|
||||
* @param isTagged - whether the current commit is tagged with a version
|
||||
*/
|
||||
constructor(major, minor, patch, hash, currentMajor, currentMinor, currentPatch, isTagged) {
|
||||
this.major = major;
|
||||
this.minor = minor;
|
||||
this.patch = patch;
|
||||
this.hash = hash;
|
||||
this.currentMajor = currentMajor;
|
||||
this.currentMinor = currentMinor;
|
||||
this.currentPatch = currentPatch;
|
||||
this.isTagged = isTagged;
|
||||
}
|
||||
}
|
||||
exports.ReleaseInformation = ReleaseInformation;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5907:
|
||||
|
|
@ -5437,6 +5294,14 @@ function version(uuid) {
|
|||
var _default = version;
|
||||
exports["default"] = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2376:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = eval("require")("./providers/DefaultLastReleaseResolver");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9491:
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
10
dist/licenses.txt
vendored
10
dist/licenses.txt
vendored
|
|
@ -59,6 +59,16 @@ The above copyright notice and this permission notice shall be included in all c
|
|||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@vercel/ncc
|
||||
MIT
|
||||
Copyright 2018 ZEIT, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class DefaultLastReleaseResolver {
|
|||
currentTag = tagFormatter.IsValid(currentTag) ? currentTag : '';
|
||||
const isTagged = currentTag !== '';
|
||||
const [currentMajor, currentMinor, currentPatch] = !!currentTag ? tagFormatter.Parse(currentTag) : [null, null, null];
|
||||
core.info("VAGO DefaultLastReleaseResolver.ResolveAsync: currentTag: " + currentTag + ", currentMajor: " + currentMajor + ", currentMinor: " + currentMinor + ", currentPatch: " + currentPatch);
|
||||
let tagsCount = 0;
|
||||
let tag = '';
|
||||
try {
|
||||
|
|
@ -86,11 +87,13 @@ class DefaultLastReleaseResolver {
|
|||
}
|
||||
}
|
||||
const [major, minor, patch] = tagFormatter.Parse('');
|
||||
core.info("VAGO tag was empty: " + major + ", " + minor + ", " + patch);
|
||||
// no release tags yet, use the initial commit as the root
|
||||
return new ReleaseInformation_1.ReleaseInformation(major, minor, patch, '', currentMajor, currentMinor, currentPatch, isTagged);
|
||||
}
|
||||
// parse the version tag
|
||||
const [major, minor, patch] = tagFormatter.Parse(tag);
|
||||
core.info("VAGO tag was not empty: " + tag + ", " + major + ", " + minor + ", " + patch);
|
||||
const root = yield (0, CommandRunner_1.cmd)('git', `merge-base`, tag, current);
|
||||
return new ReleaseInformation_1.ReleaseInformation(major, minor, patch, root.trim(), currentMajor, currentMinor, currentPatch, isTagged);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export class DefaultLastReleaseResolver implements LastReleaseResolver {
|
|||
const isTagged = currentTag !== '';
|
||||
|
||||
const [currentMajor, currentMinor, currentPatch] = !!currentTag ? tagFormatter.Parse(currentTag) : [null, null, null];
|
||||
core.info("VAGO DefaultLastReleaseResolver.ResolveAsync: currentTag: " + currentTag + ", currentMajor: " + currentMajor + ", currentMinor: " + currentMinor + ", currentPatch: " + currentPatch);
|
||||
|
||||
let tagsCount = 0;
|
||||
|
||||
|
|
@ -69,12 +70,14 @@ export class DefaultLastReleaseResolver implements LastReleaseResolver {
|
|||
}
|
||||
}
|
||||
const [major, minor, patch] = tagFormatter.Parse('');
|
||||
core.info("VAGO tag was empty: " + major + ", " + minor + ", " + patch);
|
||||
// no release tags yet, use the initial commit as the root
|
||||
return new ReleaseInformation(major, minor, patch, '', currentMajor, currentMinor, currentPatch, isTagged);
|
||||
}
|
||||
|
||||
// parse the version tag
|
||||
const [major, minor, patch] = tagFormatter.Parse(tag);
|
||||
core.info("VAGO tag was not empty: "+ tag + ", " + major + ", " + minor + ", " + patch);
|
||||
const root = await cmd('git', `merge-base`, tag, current);
|
||||
return new ReleaseInformation(major, minor, patch, root.trim(), currentMajor, currentMinor, currentPatch, isTagged);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue