Skip to content

Commit

Permalink
add triplet to cache's key
Browse files Browse the repository at this point in the history
  • Loading branch information
lukka committed Jul 1, 2020
1 parent a260931 commit adb1ed3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,10 @@ class VcpkgAction {
key += "-args=" + hashCode(core.getInput(globals.vcpkgArguments));
key += "-os=" + hashCode(process.platform);
key += "-appendedKey=" + hashCode(core.getInput(exports.appendedCacheKey));
// Add the triplet only if it is provided.
const triplet = core.getInput(globals.vcpkgTriplet);
if (triplet)
key += "-triplet=" + hashCode(triplet);
return key;
}
}
Expand Down
4 changes: 4 additions & 0 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,10 @@ class VcpkgAction {
key += "-args=" + hashCode(core.getInput(globals.vcpkgArguments));
key += "-os=" + hashCode(process.platform);
key += "-appendedKey=" + hashCode(core.getInput(exports.appendedCacheKey));
// Add the triplet only if it is provided.
const triplet = core.getInput(globals.vcpkgTriplet);
if (triplet)
key += "-triplet=" + hashCode(triplet);
return key;
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/vcpkg-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ export class VcpkgAction {
key += "-args=" + hashCode(core.getInput(globals.vcpkgArguments));
key += "-os=" + hashCode(process.platform);
key += "-appendedKey=" + hashCode(core.getInput(appendedCacheKey));

// Add the triplet only if it is provided.
const triplet = core.getInput(globals.vcpkgTriplet)
if (triplet)
key += "-triplet=" + hashCode(triplet);
return key;
}
}

0 comments on commit adb1ed3

Please sign in to comment.