fix test
This commit is contained in:
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -106,11 +106,11 @@ function getFlutter(version, channel) {
|
|||||||
const platform = release.getPlatform();
|
const platform = release.getPlatform();
|
||||||
const useMaster = channel == 'master';
|
const useMaster = channel == 'master';
|
||||||
const { version: selected, downloadUrl, channel: validatedChannel } = yield release.determineVersion(version, useMaster ? 'dev' : channel, platform);
|
const { version: selected, downloadUrl, channel: validatedChannel } = yield release.determineVersion(version, useMaster ? 'dev' : channel, platform);
|
||||||
if (channel !== validatedChannel) {
|
if (!useMaster && channel !== validatedChannel) {
|
||||||
core.debug(`Channel was identifyed as ${validatedChannel}`);
|
core.debug(`Channel was identified as ${validatedChannel}`);
|
||||||
}
|
}
|
||||||
let cleanver = useMaster
|
let cleanver = useMaster
|
||||||
? validatedChannel
|
? channel
|
||||||
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
||||||
let toolPath = tc.find('flutter', cleanver);
|
let toolPath = tc.find('flutter', cleanver);
|
||||||
if (toolPath) {
|
if (toolPath) {
|
||||||
@@ -123,7 +123,7 @@ function getFlutter(version, channel) {
|
|||||||
const sdkDir = yield extract(sdkFile, sdkCache, path.basename(downloadUrl));
|
const sdkDir = yield extract(sdkFile, sdkCache, path.basename(downloadUrl));
|
||||||
toolPath = yield tc.cacheDir(sdkDir, 'flutter', cleanver);
|
toolPath = yield tc.cacheDir(sdkDir, 'flutter', cleanver);
|
||||||
}
|
}
|
||||||
core.exportVariable('FLUTTER_HOME', toolPath);
|
core.exportVariable('FLUTTER_ROOT', toolPath);
|
||||||
core.addPath(path.join(toolPath, 'bin'));
|
core.addPath(path.join(toolPath, 'bin'));
|
||||||
core.addPath(path.join(toolPath, 'bin', 'cache', 'dart-sdk', 'bin'));
|
core.addPath(path.join(toolPath, 'bin', 'cache', 'dart-sdk', 'bin'));
|
||||||
if (useMaster) {
|
if (useMaster) {
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ export async function getFlutter(
|
|||||||
platform
|
platform
|
||||||
);
|
);
|
||||||
|
|
||||||
if (channel !== validatedChannel) {
|
if (!useMaster && channel !== validatedChannel) {
|
||||||
core.debug(`Channel was identifyed as ${validatedChannel}`);
|
core.debug(`Channel was identified as ${validatedChannel}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let cleanver = useMaster
|
let cleanver = useMaster
|
||||||
? validatedChannel
|
? channel
|
||||||
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
||||||
|
|
||||||
let toolPath = tc.find('flutter', cleanver);
|
let toolPath = tc.find('flutter', cleanver);
|
||||||
|
|||||||
Reference in New Issue
Block a user