diff --git a/build-and-publish/index.js b/build-and-publish/index.js index 45d7d05..4e16bd1 100644 --- a/build-and-publish/index.js +++ b/build-and-publish/index.js @@ -4167,7 +4167,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11504,6 +11516,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11556,11 +11569,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43791,9 +43807,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43877,7 +43893,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/build/index.js b/build/index.js index e74962a..169bd76 100644 --- a/build/index.js +++ b/build/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43791,9 +43807,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43877,7 +43893,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/cleanup/index.js b/cleanup/index.js index 36ebdbf..ebe3c76 100644 --- a/cleanup/index.js +++ b/cleanup/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43791,9 +43807,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43877,7 +43893,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/converge/index.js b/converge/index.js index 6b700a1..47bc5b3 100644 --- a/converge/index.js +++ b/converge/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43792,9 +43808,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43878,7 +43894,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/deploy/index.js b/deploy/index.js index ffc3360..8b77fe7 100644 --- a/deploy/index.js +++ b/deploy/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43756,9 +43772,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43842,7 +43858,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/dismiss/index.js b/dismiss/index.js index 2e7dd61..a426274 100644 --- a/dismiss/index.js +++ b/dismiss/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11505,6 +11517,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11557,11 +11570,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43792,9 +43808,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43878,7 +43894,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/install/index.js b/install/index.js index f877c28..a65086b 100644 --- a/install/index.js +++ b/install/index.js @@ -1880,6 +1880,20 @@ function _readLinuxVersionFile() { exports._readLinuxVersionFile = _readLinuxVersionFile; //# sourceMappingURL=manifest.js.map +/***/ }), + +/***/ 290: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + /***/ }), /***/ 293: @@ -17328,9 +17342,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(646)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -17414,7 +17428,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/publish/index.js b/publish/index.js index db1e577..04f1a88 100644 --- a/publish/index.js +++ b/publish/index.js @@ -4118,7 +4118,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11455,6 +11467,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11507,11 +11520,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43791,9 +43807,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43877,7 +43893,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/run/index.js b/run/index.js index a96a99e..f7af389 100644 --- a/run/index.js +++ b/run/index.js @@ -4240,7 +4240,19 @@ module.exports = gt /***/ }), -/* 290 */, +/* 290 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MINOR = exports.MAJOR = exports.MAJOR_MINOR_GROUP = void 0; +exports.MAJOR_MINOR_GROUP = '1.1'; +exports.MAJOR = 1; +exports.MINOR = 1; + + +/***/ }), /* 291 */, /* 292 */, /* 293 */ @@ -11577,6 +11589,7 @@ const semver = __importStar(__webpack_require__(232)); const github_1 = __webpack_require__(127); const typescript_string_operations_1 = __webpack_require__(863); const manager_1 = __webpack_require__(965); +const werf = __importStar(__webpack_require__(290)); const minimalWerfVersion = 'v1.1.17'; function PrepareEnvironAndRunWerfCommand(args) { return __awaiter(this, void 0, void 0, function* () { @@ -11629,11 +11642,14 @@ exports.ProcessGitHubContext = ProcessGitHubContext; function ValidateWerfVersion(version) { const ver = semver.coerce(version); if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error(typescript_string_operations_1.String.Format('The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', version.trim(), werf.MAJOR_MINOR_GROUP)); + } if (semver.gte(ver, minimalWerfVersion)) { return; } } - throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version should be equal or greater than {1})', version.trim(), minimalWerfVersion)); + throw new Error(typescript_string_operations_1.String.Format('werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion)); } exports.ValidateWerfVersion = ValidateWerfVersion; @@ -43864,9 +43880,9 @@ const typescript_string_operations_1 = __webpack_require__(863); const crypto = __importStar(__webpack_require__(417)); const tmp = __importStar(__webpack_require__(801)); const dotenv = __importStar(__webpack_require__(972)); +const werf = __importStar(__webpack_require__(290)); const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL'; const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL'; -const MAJOR_MINOR_GROUP = '1.1'; class Manager { constructor() { this.channel = core.getInput('channel').trim(); @@ -43950,7 +43966,7 @@ class Manager { else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD; query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/src/common.ts b/src/common.ts index 7b846b3..615f602 100644 --- a/src/common.ts +++ b/src/common.ts @@ -5,6 +5,7 @@ import * as semver from 'semver' import {context} from '@actions/github' import {String} from 'typescript-string-operations' import {Manager} from './manager' +import * as werf from './werf' const minimalWerfVersion = 'v1.1.17' @@ -66,6 +67,16 @@ export function ProcessGitHubContext(): void { export function ValidateWerfVersion(version: string): void { const ver = semver.coerce(version) if (ver) { + if (ver.major !== werf.MAJOR || ver.minor !== werf.MINOR) { + throw new Error( + String.Format( + 'The arbitrary version ({0}) must be within the MAJOR.MINOR ({1})', + version.trim(), + werf.MAJOR_MINOR_GROUP + ) + ) + } + if (semver.gte(ver, minimalWerfVersion)) { return } @@ -73,7 +84,7 @@ export function ValidateWerfVersion(version: string): void { throw new Error( String.Format( - 'werf version {0} is not supported (expected version should be equal or greater than {1})', + 'werf version {0} is not supported (expected version must be equal or greater than {1})', version.trim(), minimalWerfVersion ) diff --git a/src/manager.ts b/src/manager.ts index 8a7ef7c..7388475 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -9,11 +9,11 @@ import {String} from 'typescript-string-operations' import * as crypto from 'crypto' import * as tmp from 'tmp' import * as dotenv from 'dotenv' +import * as werf from './werf' const WERF_API_GET_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL' const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL' -const MAJOR_MINOR_GROUP = '1.1' export class Manager { private readonly channel: string @@ -112,7 +112,7 @@ export class Manager { } else { url = WERF_API_GET_CHANNEL_VERSION_URL_METHOD query = { - group: MAJOR_MINOR_GROUP, + group: werf.MAJOR_MINOR_GROUP, channel: this.channel, os: this.os, arch: this.arch diff --git a/src/werf.ts b/src/werf.ts new file mode 100644 index 0000000..5e0f096 --- /dev/null +++ b/src/werf.ts @@ -0,0 +1,3 @@ +export const MAJOR_MINOR_GROUP = '1.1' +export const MAJOR = 1 +export const MINOR = 1