Skip to content

Commit eceac89

Browse files
authored
feat: print --version for all tools at end of action (#103)
1 parent 322b392 commit eceac89

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
## Commands
44

55
```bash
6-
npm run build # Build with ncc to dist/
7-
npx prettier --check . # Check formatting
8-
npx prettier --write . # Fix formatting
6+
nvm use # Use correct Node version (see .nvmrc)
7+
npm run build # Build with ncc to dist/
8+
npx prettier --check . # Check formatting
9+
npx prettier --write . # Fix formatting
910
```
1011

1112
No test framework configured.

dist/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44593,6 +44593,7 @@ const { restoreRPCCache } = __nccwpck_require__(42351);
4459344593
const FOUNDRYUP_INSTALLER_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/HEAD/foundryup/install";
4459444594
const FOUNDRY_DIR = path.join(os.homedir(), ".foundry");
4459544595
const FOUNDRY_BIN = path.join(FOUNDRY_DIR, "bin");
44596+
const FOUNDRY_TOOLS = ["forge", "cast", "anvil", "chisel"];
4459644597

4459744598
function downloadOnce(url, dest) {
4459844599
return new Promise((resolve, reject) => {
@@ -44687,6 +44688,13 @@ async function main() {
4468744688
} else {
4468844689
core.info("Cache not requested, not restoring cache");
4468944690
}
44691+
44692+
// Print installed versions
44693+
for (const bin of FOUNDRY_TOOLS) {
44694+
try {
44695+
execSync(`${bin} --version`, { stdio: "inherit" });
44696+
} catch {}
44697+
}
4469044698
} catch (err) {
4469144699
core.setFailed(err);
4469244700
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const { restoreRPCCache } = require("./cache");
1010
const FOUNDRYUP_INSTALLER_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/HEAD/foundryup/install";
1111
const FOUNDRY_DIR = path.join(os.homedir(), ".foundry");
1212
const FOUNDRY_BIN = path.join(FOUNDRY_DIR, "bin");
13+
const FOUNDRY_TOOLS = ["forge", "cast", "anvil", "chisel"];
1314

1415
function downloadOnce(url, dest) {
1516
return new Promise((resolve, reject) => {
@@ -104,6 +105,14 @@ async function main() {
104105
} else {
105106
core.info("Cache not requested, not restoring cache");
106107
}
108+
109+
// Print installed versions
110+
for (const bin of FOUNDRY_TOOLS) {
111+
try {
112+
core.info(`Running: ${bin} --version`);
113+
execSync(`${bin} --version`, { stdio: "inherit" });
114+
} catch {}
115+
}
107116
} catch (err) {
108117
core.setFailed(err);
109118
}

0 commit comments

Comments
 (0)