Skip to content

Commit

Permalink
add powershell support for just
Browse files Browse the repository at this point in the history
  • Loading branch information
Kvadratni committed Jan 29, 2025
1 parent e24f3b9 commit e4ee28d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ release:

# Build Windows executable
release-windows:
@echo "Building Windows executable..."
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp \
rust:latest \
sh -c "rustup target add x86_64-pc-windows-gnu && \
apt-get update && \
apt-get install -y mingw-w64 && \
cargo build --release --target x86_64-pc-windows-gnu"
#!/usr/bin/env sh
if [ "$(uname)" = "Darwin" ] || [ "$(uname)" = "Linux" ]; then
echo "Building Windows executable using Docker..."
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp \
rust:latest \
sh -c "rustup target add x86_64-pc-windows-gnu && \
apt-get update && \
apt-get install -y mingw-w64 && \
cargo build --release --target x86_64-pc-windows-gnu"
else
echo "Building Windows executable natively..."
powershell.exe -Command "docker run --rm -v ${PWD}:/usr/src/myapp -w /usr/src/myapp rust:latest sh -c 'rustup target add x86_64-pc-windows-gnu && apt-get update && apt-get install -y mingw-w64 && cargo build --release --target x86_64-pc-windows-gnu'"
fi
@echo "Windows executable created at ./target/x86_64-pc-windows-gnu/release/goosed.exe"
# Copy binary command
Expand Down Expand Up @@ -58,7 +64,6 @@ make-ui-windows:
echo "Windows binary not found."; \
exit 1; \
fi
export MONO_GAC_PREFIX="/opt/homebrew"; \
cd ui/desktop && npm run bundle:windows

# Setup langfuse server
Expand Down

0 comments on commit e4ee28d

Please sign in to comment.