Skip to content

Commit

Permalink
Merge pull request #16 from Xenira/dev
Browse files Browse the repository at this point in the history
ci(build): fixed generated assets not beeing included
  • Loading branch information
Xenira authored Jun 5, 2023
2 parents 3327226 + 41b0e4e commit 5265584
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ RUN cd /server && RUSTFLAGS="-C target-feature=-crt-static" cargo build --target
# Final Image
##################################################
FROM chef as composer
COPY ./server/static ./static
COPY --from=builder-server /server/target/x86_64-unknown-linux-musl/release/rog-server .
COPY --from=builder-client /client/dist ./static
COPY ./server/static ./static

FROM alpine as server
WORKDIR /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion client/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[[hooks]]
stage = "post_build"
command = "./cleanup_assets.sh"
command = "./process_assets.sh"
10 changes: 0 additions & 10 deletions client/cleanup_assets.sh

This file was deleted.

1 change: 0 additions & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link data-trunk rel="copy-dir" href="assets" />
<link rel="icon" href="data:,">
<title>space_3</title>

Expand Down
15 changes: 15 additions & 0 deletions client/process_assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

cp -r $TRUNK_SOURCE_DIR/assets $TRUNK_STAGING_DIR/assets

echo "Removing .txt files from $TRUNK_STAGING_DIR"
find $TRUNK_STAGING_DIR -name "*.txt" -type f -delete -print

echo "Removing .json files from $TRUNK_STAGING_DIR"
find $TRUNK_STAGING_DIR -name "*.json" -type f -delete -print

echo "Removing .aseprite files from $TRUNK_STAGING_DIR"
find $TRUNK_STAGING_DIR -name "*.aseprite" -type f -delete -print

echo "Removing .xcf files from $TRUNK_STAGING_DIR"
find $TRUNK_STAGING_DIR -name "*.xcf" -type f -delete -print

0 comments on commit 5265584

Please sign in to comment.