fix: update bun to 1.1.27

This commit is contained in:
Ruben Fiszel
2024-09-17 10:27:51 +02:00
parent 375f37741b
commit ae6103569a
6 changed files with 32 additions and 11 deletions
+3 -3
View File
@@ -11,8 +11,8 @@ SHELL ["/bin/bash", "-c"]
RUN apt update -y
RUN apt install -y unzip curl
RUN [ "$TARGETPLATFORM" == "linux/amd64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.41.0/deno-x86_64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/arm64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.41.0/deno-aarch64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/amd64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.46.3/deno-x86_64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/arm64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.46.3/deno-aarch64-unknown-linux-gnu.zip -o deno.zip || true
RUN unzip deno.zip && rm deno.zip
@@ -53,7 +53,7 @@ RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VER
RUN /usr/local/bin/python3 -m pip install pip-tools
COPY --from=oven/bun:1.1.8 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.1.27 /usr/local/bin/bun /usr/bin/bun
RUN [ "$TARGETPLATFORM" == "linux/amd64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.41.0/deno-x86_64-unknown-linux-gnu.zip -o deno.zip || true
+1 -1
View File
@@ -172,7 +172,7 @@ COPY --from=builder /windmill/target/release/windmill ${APP}/windmill
COPY --from=denoland/deno:1.46.3 --chmod=755 /usr/bin/deno /usr/bin/deno
COPY --from=oven/bun:1.1.25 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.1.27 /usr/local/bin/bun /usr/bin/bun
COPY --from=php:8.3.7-cli /usr/local/bin/php /usr/bin/php
COPY --from=composer:2.7.6 /usr/bin/composer /usr/bin/composer
+12
View File
@@ -145,6 +145,17 @@ const command = new Command()
.command("completions", new CompletionsCommand());
export let showDiffs = false;
let isWin: boolean | undefined = undefined;
export async function getIsWin() {
if (isWin === undefined) {
const os = await import("node:os");
isWin = os.platform() === "win32";
}
return isWin;
}
async function main() {
try {
if (Deno.args.length === 0) {
@@ -161,6 +172,7 @@ async function main() {
handlers: {
console: new log.ConsoleHandler(LOG_LEVEL, {
formatter: ({ msg }) => `${msg}`,
useColors: isWin ? false : true,
}),
},
loggers: {
+14 -3
View File
@@ -42,6 +42,7 @@ import {
import { generateHash, readInlinePathSync } from "./utils.ts";
import { SyncCodebase } from "./codebase.ts";
import { FlowFile, replaceInlineScripts } from "./flow.ts";
import { getIsWin } from "./main.ts";
export async function generateAllMetadata() {}
@@ -169,6 +170,12 @@ export async function generateFlowLockInternal(
log.info(colors.green(`Flow ${remote_path} lockfiles updated`));
}
// on windows, when using powershell, blue is not readable
async function blueColor(): Promise<(x: string) => void> {
const isWin = await getIsWin();
return isWin ? colors.black : colors.blue;
}
export async function generateScriptMetadataInternal(
scriptPath: string,
workspace: Workspace,
@@ -196,7 +203,7 @@ export async function generateScriptMetadataInternal(
);
if (rawReqs) {
log.info(
colors.blue(
(await blueColor())(
`Found raw requirements (package.json/requirements.txt/composer.json) for ${scriptPath}, using it`
)
);
@@ -786,7 +793,9 @@ export async function parseMetadataFile(
} catch {
// no metadata file at all. Create it
log.info(
colors.blue(`Creating script metadata file for ${metadataFilePath}`)
(await blueColor())(
`Creating script metadata file for ${metadataFilePath}`
)
);
metadataFilePath = scriptPath + ".script.yaml";
let scriptInitialMetadata = defaultScriptMetadata();
@@ -800,7 +809,9 @@ export async function parseMetadataFile(
if (generateMetadataIfMissing) {
log.info(
colors.blue(`Generating lockfile and schema for ${metadataFilePath}`)
(await blueColor())(
`Generating lockfile and schema for ${metadataFilePath}`
)
);
try {
await generateScriptMetadataInternal(
+1 -2
View File
@@ -15,7 +15,7 @@ ENV TZ=Etc/UTC
RUN /usr/local/bin/python3 -m pip install pip-tools
COPY --from=oven/bun:1.1.26 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.1.27 /usr/local/bin/bun /usr/bin/bun
# add the docker client to call docker from a worker if enabled
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
@@ -23,7 +23,6 @@ COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
WORKDIR ${APP}
COPY --from=ghcr.io/windmill-labs/windmill-ee:dev --chmod=755 ${APP}/windmill ${APP}/windmill
COPY --from=denoland/deno:1.46.1 --chmod=755 /usr/bin/deno /usr/bin/deno
RUN ln -s ${APP}/windmill /usr/local/bin/windmill
+1 -2
View File
@@ -15,7 +15,7 @@ ENV TZ=Etc/UTC
RUN /usr/local/bin/python3 -m pip install pip-tools
COPY --from=oven/bun:1.1.26 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.1.27 /usr/local/bin/bun /usr/bin/bun
# add the docker client to call docker from a worker if enabled
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
@@ -23,7 +23,6 @@ COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
WORKDIR ${APP}
COPY --from=ghcr.io/windmill-labs/windmill-ee:dev --chmod=755 ${APP}/windmill ${APP}/windmill
COPY --from=denoland/deno:1.46.1 --chmod=755 /usr/bin/deno /usr/bin/deno
RUN ln -s ${APP}/windmill /usr/local/bin/windmill