1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

handle 1.7 as 1.7.x

This commit is contained in:
Alif Rachmawadi 2019-08-18 21:23:37 +07:00
parent 5fe8a7cf47
commit a1e481922d
No known key found for this signature in database
GPG key ID: 79DA63C0F3A55BB1
2 changed files with 10 additions and 0 deletions

View file

@ -49,6 +49,10 @@ if (!tempDirectory) {
}
function getFlutter(version, channel) {
return __awaiter(this, void 0, void 0, function* () {
const versionPart = version.split('.');
if (versionPart[1] == null || versionPart[2] == null) {
version = version.concat('.x');
}
version = yield determineVersion(version, channel);
let cleanver = `${version.replace('+', '-')}-${channel}`;
let toolPath = tc.find('flutter', cleanver);

View file

@ -36,6 +36,12 @@ export async function getFlutter(
version: string,
channel: string
): Promise<void> {
const versionPart = version.split('.');
if (versionPart[1] == null || versionPart[2] == null) {
version = version.concat('.x');
}
version = await determineVersion(version, channel);
let cleanver = `${version.replace('+', '-')}-${channel}`;