Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed May 31, 2024
1 parent 0534a6f commit 1ec8655
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const sourceCacheKey = core.getInput("source-cache-key");
const manifestKey = core.getInput("manifest");
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
const artifactIDs = core.getInput("artifact-ids");
const artifactNames = core.getInput("artifact-names");

async function run(name: string, command: string, args: string[]) {
const PATH = process.env.PATH ? process.env.PATH : "";
Expand Down Expand Up @@ -44,7 +44,7 @@ async function main() {
const installCacheKey = await cache.restoreCache(
installPath,
installKey,
[]
[],
);
if (installCacheKey) {
console.log("Restored the install cache");
Expand Down Expand Up @@ -72,7 +72,7 @@ async function main() {
const buildCacheKey = await cache.restoreCache(
depsPath,
buildKey,
restoreKeys
restoreKeys,
);
if (buildCacheKey) {
console.log("Restored the build cache");
Expand Down Expand Up @@ -115,7 +115,7 @@ async function prepareNPMArtifacts() {
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
try {
const manifestFilePath = JSON.parse(
cp.execSync(statusCmd).toString()
cp.execSync(statusCmd).toString(),
).rootPackageConfigPath;
const manifest = JSON.parse(fs.readFileSync(manifestFilePath).toString());
if (manifest.esy.release) {
Expand All @@ -142,7 +142,7 @@ async function prepareNPMArtifacts() {
// optional: how long to retain the artifact
// if unspecified, defaults to repository/org retention settings (the limit of this value)
retentionDays: 10,
}
},
);

core.setOutput(`${platform}-${arch}`, `${id}`);
Expand All @@ -157,7 +157,7 @@ async function prepareNPMArtifacts() {
}

function bundleNPMArtifacts() {
core.setOutput("artifactIDS", artifactIDs);
core.setOutput("artifactIDS", JSON.parse(artifactNames));
}

if (prepareNPMArtifactsMode) {
Expand Down

0 comments on commit 1ec8655

Please sign in to comment.