Compare commits

...

7 Commits

Author SHA1 Message Date
Alif Rachmawadi
5188e41281 Merge pull request #100 from chatsen/master
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 16m22s
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (windows-latest) (push) Has been cancelled
Fix the endpoint for flutter releases
2021-06-02 10:48:10 +07:00
William Bulin
1ced41a989 Update index.js 2021-06-02 01:38:26 +02:00
William Bulin
4ac301c302 Update release.ts 2021-06-02 01:36:53 +02:00
Alif Rachmawadi
0600af6a5c Merge pull request #93 from subosito/dependabot/npm_and_yarn/hosted-git-info-2.8.9
Bump hosted-git-info from 2.7.1 to 2.8.9
2021-05-15 14:04:20 +07:00
dependabot[bot]
1c63d3b831 Bump hosted-git-info from 2.7.1 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.7.1 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 01:25:41 +00:00
Alif Rachmawadi
086f9fb649 Merge pull request #90 from kuhnroyal/feature/pub-cache
Export PUB_CACHE if it is not in env
2021-05-01 08:31:38 +07:00
Peter Leibiger
8f6ad7c383 Export PUB_CACHE if it is not in env
Export `PUB_CACHE` if it is not configured before calling the action.
This ensures that flutter and dart use the same cache.
It also enables other tools to use this official Dart env variable.
2021-04-28 20:43:14 +02:00
4 changed files with 21 additions and 8 deletions

11
dist/index.js vendored
View File

@@ -123,9 +123,14 @@ function getFlutter(version, channel) {
toolPath = yield tc.cacheDir(sdkDir, 'flutter', cleanver);
}
core.exportVariable('FLUTTER_ROOT', toolPath);
let pubCachePath = process.env['PUB_CACHE'] || '';
if (!pubCachePath) {
pubCachePath = path.join(toolPath, '.pub-cache');
core.exportVariable('PUB_CACHE', pubCachePath);
}
core.addPath(path.join(toolPath, 'bin'));
core.addPath(path.join(toolPath, 'bin', 'cache', 'dart-sdk', 'bin'));
core.addPath(path.join(toolPath, '.pub-cache', 'bin'));
core.addPath(path.join(pubCachePath, 'bin'));
if (useMaster) {
yield exec.exec('flutter', ['channel', 'master']);
yield exec.exec('flutter', ['upgrade']);
@@ -226,7 +231,7 @@ exports.determineVersion = exports.getPlatform = exports.storageUrl = void 0;
const core = __importStar(__nccwpck_require__(2186));
const httpm = __importStar(__nccwpck_require__(9925));
const semver = __importStar(__nccwpck_require__(1383));
exports.storageUrl = 'https://storage.googleapis.com/flutter_infra/releases';
exports.storageUrl = 'https://storage.googleapis.com/flutter_infra_release/releases';
function getPlatform() {
const platform = process.platform;
if (platform == 'win32') {
@@ -8516,4 +8521,4 @@ module.exports = require("util");;
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;
;

6
package-lock.json generated
View File

@@ -2491,9 +2491,9 @@
}
},
"hosted-git-info": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
"integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
"html-encoding-sniffer": {

View File

@@ -46,9 +46,17 @@ export async function getFlutter(
}
core.exportVariable('FLUTTER_ROOT', toolPath);
let pubCachePath = process.env['PUB_CACHE'] || '';
if (!pubCachePath) {
pubCachePath = path.join(toolPath, '.pub-cache');
core.exportVariable('PUB_CACHE', pubCachePath);
}
core.addPath(path.join(toolPath, 'bin'));
core.addPath(path.join(toolPath, 'bin', 'cache', 'dart-sdk', 'bin'));
core.addPath(path.join(toolPath, '.pub-cache', 'bin'));
core.addPath(path.join(pubCachePath, 'bin'));
if (useMaster) {
await exec.exec('flutter', ['channel', 'master']);

View File

@@ -3,7 +3,7 @@ import * as httpm from '@actions/http-client';
import * as semver from 'semver';
export const storageUrl =
'https://storage.googleapis.com/flutter_infra/releases';
'https://storage.googleapis.com/flutter_infra_release/releases';
interface IFlutterData {
channel: string;