Validate werf version

This commit is contained in:
Alexey Igrychev
2021-03-10 13:49:26 +00:00
parent 3a89c159de
commit f589022202
11 changed files with 26868 additions and 193 deletions

View File

@@ -11528,8 +11528,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43808,12 +43806,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43808,12 +43806,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43808,12 +43806,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43809,12 +43807,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43773,12 +43771,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11529,8 +11529,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43809,12 +43807,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

File diff suppressed because one or more lines are too long

View File

@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43808,12 +43806,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -11601,8 +11601,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
}
const m = new manager_1.Manager();
yield m.Install();
const versionOutput = yield m.GetOutput(['version']);
ValidateWerfVersion(versionOutput);
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token');
yield m.PerformCIEnv();
@@ -43881,12 +43879,16 @@ 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 common_1 = __webpack_require__(428);
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';
class Manager {
constructor() {
this.channel = core.getInput('channel').trim();
this.version = core.getInput('version').trim();
if (this.version !== '') {
common_1.ValidateWerfVersion(this.version);
}
if (process.platform.toString() === 'win32') {
this.os = 'windows';
}

View File

@@ -23,9 +23,6 @@ export async function PrepareEnvironAndRunWerfCommand(
const m = new Manager()
await m.Install()
const versionOutput = await m.GetOutput(['version'])
ValidateWerfVersion(versionOutput)
process.env.GITHUB_TOKEN =
process.env.GITHUB_TOKEN || core.getInput('github-token')
await m.PerformCIEnv()

View File

@@ -10,6 +10,7 @@ import * as crypto from 'crypto'
import * as tmp from 'tmp'
import * as dotenv from 'dotenv'
import * as werf from './werf'
import {ValidateWerfVersion} from './common'
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD =
'https://werf.io/api/getChannelVersionURL'
@@ -27,6 +28,10 @@ export class Manager {
this.channel = core.getInput('channel').trim()
this.version = core.getInput('version').trim()
if (this.version !== '') {
ValidateWerfVersion(this.version)
}
if (process.platform.toString() === 'win32') {
this.os = 'windows'
} else {