mirror of
https://github.com/werf/actions.git
synced 2026-03-22 23:43:06 +03:00
Merge pull request #22 from werf/validate_werf_version
Validate werf version
This commit is contained in:
@@ -11528,8 +11528,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43808,12 +43806,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43808,12 +43806,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43808,12 +43806,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43809,12 +43807,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43773,12 +43771,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11529,8 +11529,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43809,12 +43807,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
27005
install/index.js
27005
install/index.js
File diff suppressed because one or more lines are too long
@@ -11479,8 +11479,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43808,12 +43806,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11601,8 +11601,6 @@ function PrepareEnvironAndRunWerfCommand(args) {
|
|||||||
}
|
}
|
||||||
const m = new manager_1.Manager();
|
const m = new manager_1.Manager();
|
||||||
yield m.Install();
|
yield m.Install();
|
||||||
const versionOutput = yield m.GetOutput(['version']);
|
|
||||||
ValidateWerfVersion(versionOutput);
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
process.env.GITHUB_TOKEN || core.getInput('github-token');
|
||||||
yield m.PerformCIEnv();
|
yield m.PerformCIEnv();
|
||||||
@@ -43881,12 +43879,16 @@ const crypto = __importStar(__webpack_require__(417));
|
|||||||
const tmp = __importStar(__webpack_require__(801));
|
const tmp = __importStar(__webpack_require__(801));
|
||||||
const dotenv = __importStar(__webpack_require__(972));
|
const dotenv = __importStar(__webpack_require__(972));
|
||||||
const werf = __importStar(__webpack_require__(290));
|
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_CHANNEL_VERSION_URL_METHOD = 'https://werf.io/api/getChannelVersionURL';
|
||||||
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
const WERF_API_GET_VERSION_URL_METHOD = 'https://werf.io/api/getVersionURL';
|
||||||
class Manager {
|
class Manager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.channel = core.getInput('channel').trim();
|
this.channel = core.getInput('channel').trim();
|
||||||
this.version = core.getInput('version').trim();
|
this.version = core.getInput('version').trim();
|
||||||
|
if (this.version !== '') {
|
||||||
|
common_1.ValidateWerfVersion(this.version);
|
||||||
|
}
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows';
|
this.os = 'windows';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ export async function PrepareEnvironAndRunWerfCommand(
|
|||||||
const m = new Manager()
|
const m = new Manager()
|
||||||
await m.Install()
|
await m.Install()
|
||||||
|
|
||||||
const versionOutput = await m.GetOutput(['version'])
|
|
||||||
ValidateWerfVersion(versionOutput)
|
|
||||||
|
|
||||||
process.env.GITHUB_TOKEN =
|
process.env.GITHUB_TOKEN =
|
||||||
process.env.GITHUB_TOKEN || core.getInput('github-token')
|
process.env.GITHUB_TOKEN || core.getInput('github-token')
|
||||||
await m.PerformCIEnv()
|
await m.PerformCIEnv()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import * as crypto from 'crypto'
|
|||||||
import * as tmp from 'tmp'
|
import * as tmp from 'tmp'
|
||||||
import * as dotenv from 'dotenv'
|
import * as dotenv from 'dotenv'
|
||||||
import * as werf from './werf'
|
import * as werf from './werf'
|
||||||
|
import {ValidateWerfVersion} from './common'
|
||||||
|
|
||||||
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD =
|
const WERF_API_GET_CHANNEL_VERSION_URL_METHOD =
|
||||||
'https://werf.io/api/getChannelVersionURL'
|
'https://werf.io/api/getChannelVersionURL'
|
||||||
@@ -27,6 +28,10 @@ export class Manager {
|
|||||||
this.channel = core.getInput('channel').trim()
|
this.channel = core.getInput('channel').trim()
|
||||||
this.version = core.getInput('version').trim()
|
this.version = core.getInput('version').trim()
|
||||||
|
|
||||||
|
if (this.version !== '') {
|
||||||
|
ValidateWerfVersion(this.version)
|
||||||
|
}
|
||||||
|
|
||||||
if (process.platform.toString() === 'win32') {
|
if (process.platform.toString() === 'win32') {
|
||||||
this.os = 'windows'
|
this.os = 'windows'
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user