resolved comments, update readme, add e2e tests.

This commit is contained in:
Dmitry Shibanov 2020-12-15 16:27:56 +03:00 committed by GitHub
parent 739154f76b
commit 3d613a97df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 180 additions and 38 deletions

View file

@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import * as semver from 'semver';
export const IS_WINDOWS = process.platform === 'win32';
export const IS_LINUX = process.platform === 'linux';
@ -40,3 +41,11 @@ export function createSymlinkInFolder(
fs.chmodSync(targetPath, '755');
}
}
export function validateVersion(version: string) {
return isNightlyKeyword(version) || Boolean(semver.validRange(version));
}
export function isNightlyKeyword(pypyVersion: string) {
return pypyVersion === 'nightly';
}