Skip to content

Commit

Permalink
Merge pull request #383 from actions/dhadka/cache-1.0.1
Browse files Browse the repository at this point in the history
Upgrade to cache 1.0.1
  • Loading branch information
David Hadka authored and GitHub committed Jul 21, 2020
2 parents 481a91b + d59a146 commit d29c1df
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ const semver = __importStar(__webpack_require__(280));
const util = __importStar(__webpack_require__(669));
const uuid_1 = __webpack_require__(898);
const constants_1 = __webpack_require__(931);
// From https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L23
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
function createTempDirectory() {
return __awaiter(this, void 0, void 0, function* () {
const IS_WINDOWS = process.platform === 'win32';
Expand Down Expand Up @@ -4444,9 +4444,10 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
try {
downloadProgress.startDisplayTimer();
while (!downloadProgress.isDone()) {
const segmentSize = Math.min(maxSegmentSize, contentLength - downloadProgress.segmentOffset);
const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;
const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);
downloadProgress.nextSegment(segmentSize);
const result = yield client.downloadToBuffer(downloadProgress.segmentOffset, segmentSize, {
const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
concurrency: options.downloadConcurrency,
onProgress: downloadProgress.onProgress()
});
Expand Down
7 changes: 4 additions & 3 deletions dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ const semver = __importStar(__webpack_require__(280));
const util = __importStar(__webpack_require__(669));
const uuid_1 = __webpack_require__(898);
const constants_1 = __webpack_require__(931);
// From https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L23
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
function createTempDirectory() {
return __awaiter(this, void 0, void 0, function* () {
const IS_WINDOWS = process.platform === 'win32';
Expand Down Expand Up @@ -4444,9 +4444,10 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
try {
downloadProgress.startDisplayTimer();
while (!downloadProgress.isDone()) {
const segmentSize = Math.min(maxSegmentSize, contentLength - downloadProgress.segmentOffset);
const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;
const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);
downloadProgress.nextSegment(segmentSize);
const result = yield client.downloadToBuffer(downloadProgress.segmentOffset, segmentSize, {
const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
concurrency: options.downloadConcurrency,
onProgress: downloadProgress.onProgress()
});
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@actions/core": "^1.2.0",
"@actions/exec": "^1.0.1",
"@actions/io": "^1.0.1",
"@actions/cache": "^1.0.0"
"@actions/cache": "^1.0.1"
},
"devDependencies": {
"@types/jest": "^24.0.13",
Expand Down

0 comments on commit d29c1df

Please sign in to comment.