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

update cache path

This commit is contained in:
Alif Rachmawadi 2019-08-15 12:44:24 +07:00
parent 126ac36d04
commit fc32c521f1
No known key found for this signature in database
GPG key ID: 79DA63C0F3A55BB1
2 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ describe('installer tests', () => {
await installer.getFlutter('1.7.8+hotfix.4', 'stable');
const sdkDir = path.join(
toolDir,
'Flutter',
'flutter',
'1.7.8-hotfix.4-stable',
'x64'
);
@ -40,7 +40,7 @@ describe('installer tests', () => {
it('Downloads flutter from beta channel', async () => {
await installer.getFlutter('1.8.3', 'beta');
const sdkDir = path.join(toolDir, 'Flutter', '1.8.3-beta', 'x64');
const sdkDir = path.join(toolDir, 'flutter', '1.8.3-beta', 'x64');
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);

View file

@ -35,7 +35,7 @@ export async function getFlutter(
// make semver compatible, eg: 1.7.8+hotfix.4 -> 1.7.8-hotfix.4
const semver = version.replace('+', '-');
const cleanver = `${semver}-${channel}`;
let toolPath = tc.find('Flutter', cleanver);
let toolPath = tc.find('flutter', cleanver);
if (toolPath) {
core.debug(`Tool found in cache ${toolPath}`);
@ -49,7 +49,7 @@ export async function getFlutter(
const sdkDir = await extractDownload(sdkFile, tempDir);
core.debug(`Flutter sdk extracted to ${sdkDir}`);
toolPath = await tc.cacheDir(sdkDir, 'Flutter', cleanver);
toolPath = await tc.cacheDir(sdkDir, 'flutter', cleanver);
}
core.exportVariable('FLUTTER_HOME', toolPath);