Skip to content

Commit

Permalink
🔨 Modify scripts to support building on windows (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
JMicheli authored Dec 8, 2023
1 parent 7c33b12 commit 563313c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/lib
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ create_dummy_rust_file() {
# it's a bit of a hack, but it works lol
prisma_sed_correction() {
set -ex; \
sed -i 's|\/.*\/core\/prisma\/schema.prisma|\/app\/core\/prisma\/schema.prisma|g' core/src/prisma.rs; \
# Match windows paths
sed -i 's|[A-Z]:\\\\.*\\\\core\\\\prisma\\\\schema\.prisma|\/app\/core\/prisma\/schema.prisma|g' core/src/prisma.rs; \
sed -i 's|[A-Z]:\\\\.*\\\\core\\\\prisma\\\\migrations|\/app\/core\/prisma\/migrations|g' core/src/prisma.rs; \
# Match Unix paths
sed -i 's|\/.*\/core\/prisma\/schema\.prisma|\/app\/core\/prisma\/schema.prisma|g' core/src/prisma.rs; \
sed -i 's|\/.*\/core\/prisma\/migrations|\/app\/core\/prisma\/migrations|g' core/src/prisma.rs
}

Expand Down
16 changes: 16 additions & 0 deletions scripts/release/build-docker.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Set default values for arguments if they are not provided
$FORMAT = if ($args[0]) { $args[0] } else { "auto" }
$PLATFORMS = if ($args[1]) { $args[1] } else { "linux/amd64" }
$TAG = if ($args[2]) { $args[2] } else { "nightly" }

# Get the current Git revision
$GIT_REV = git rev-parse --short HEAD

# Build the Docker image
docker buildx build `
-f ./scripts/release/Dockerfile.debian `
--load `
--progress=$FORMAT `
--platform=$PLATFORMS `
-t aaronleopold/stump:$TAG `
--build-arg GIT_REV=$GIT_REV .

0 comments on commit 563313c

Please sign in to comment.