1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00
This commit is contained in:
Alif Rachmawadi 2020-12-01 15:41:14 +00:00
parent 618ffe6e1a
commit c1329a99f0
No known key found for this signature in database
GPG key ID: 79DA63C0F3A55BB1
2 changed files with 7 additions and 7 deletions

8
dist/index.js vendored
View file

@ -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) {

View file

@ -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);