Skip to content

Commit 2b77315

Browse files
committed
sparta wants a foundry
1 parent 79658ed commit 2b77315

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

tooling/sparta/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
FROM oven/bun:latest
22

3-
RUN apt update && apt install -y curl
3+
ENV PATH="/root/.foundry/bin:${PATH}"
4+
5+
RUN apt update && apt install -y curl apt-utils
46
RUN curl -fsSL https://get.docker.com | bash
7+
RUN curl -L https://foundry.paradigm.xyz | bash
8+
9+
RUN foundryup
10+
RUN cast --version
511

612
WORKDIR /app
713
COPY package.json ./

tooling/sparta/src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ client.on("interactionCreate", async (interaction: Interaction) => {
4949
return;
5050
}
5151

52+
if (
53+
ENVIRONMENT === "production" &&
54+
interaction.channelId !== DEV_CHANNEL_ID
55+
) {
56+
console.log(
57+
"Can't use this command in development if ENVIRONMENT is set to production"
58+
);
59+
return;
60+
}
61+
5262
const command = client.commands.get(interaction.commandName);
5363
if (!command) return;
5464

0 commit comments

Comments
 (0)