mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
fix test
This commit is contained in:
parent
618ffe6e1a
commit
c1329a99f0
2 changed files with 7 additions and 7 deletions
8
dist/index.js
vendored
8
dist/index.js
vendored
|
@ -106,11 +106,11 @@ function getFlutter(version, channel) {
|
|||
const platform = release.getPlatform();
|
||||
const useMaster = channel == 'master';
|
||||
const { version: selected, downloadUrl, channel: validatedChannel } = yield release.determineVersion(version, useMaster ? 'dev' : channel, platform);
|
||||
if (channel !== validatedChannel) {
|
||||
core.debug(`Channel was identifyed as ${validatedChannel}`);
|
||||
if (!useMaster && channel !== validatedChannel) {
|
||||
core.debug(`Channel was identified as ${validatedChannel}`);
|
||||
}
|
||||
let cleanver = useMaster
|
||||
? validatedChannel
|
||||
? channel
|
||||
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
||||
let toolPath = tc.find('flutter', cleanver);
|
||||
if (toolPath) {
|
||||
|
@ -123,7 +123,7 @@ function getFlutter(version, channel) {
|
|||
const sdkDir = yield extract(sdkFile, sdkCache, path.basename(downloadUrl));
|
||||
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', 'cache', 'dart-sdk', 'bin'));
|
||||
if (useMaster) {
|
||||
|
|
|
@ -23,12 +23,12 @@ export async function getFlutter(
|
|||
platform
|
||||
);
|
||||
|
||||
if (channel !== validatedChannel) {
|
||||
core.debug(`Channel was identifyed as ${validatedChannel}`);
|
||||
if (!useMaster && channel !== validatedChannel) {
|
||||
core.debug(`Channel was identified as ${validatedChannel}`);
|
||||
}
|
||||
|
||||
let cleanver = useMaster
|
||||
? validatedChannel
|
||||
? channel
|
||||
: `${selected.replace('+', '-')}-${validatedChannel}`;
|
||||
|
||||
let toolPath = tc.find('flutter', cleanver);
|
||||
|
|
Loading…
Reference in a new issue