From a764598f70b7914f7450780a18e41d7f709c710e Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 11 Dec 2024 13:16:15 +0100 Subject: [PATCH] Fix ci --- .woodpecker.yml | 5 ----- Cargo.toml | 4 ++-- build.rs | 7 +++++++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 build.rs diff --git a/.woodpecker.yml b/.woodpecker.yml index b721420..4bb1dda 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -79,11 +79,6 @@ steps: - export PATH="/usr/lib/postgresql/15/bin:/usr/local/cargo/bin:$PATH" - sudo -u testuser env "PATH=$PATH" "CARGO_HOME=$CARGO_HOME" cargo test --no-fail-fast - npm_install: - image: node:current-alpine - commands: - - npm install - build_release: image: *rust_image environment: diff --git a/Cargo.toml b/Cargo.toml index ad224d5..7fdc9f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,8 +65,6 @@ send_wrapper = "0.6.0" web-sys = "0.3.72" http = "1.1.0" serde_urlencoded = "0.7.1" -include_dir = "0.7.4" -mime_guess = "2.0.5" # backend-only deps [target.'cfg(not(target_family = "wasm"))'.dependencies] @@ -101,6 +99,8 @@ reqwest = { version = "0.12.9", features = ["json", "cookies"] } futures = "0.3.31" env_logger = { version = "0.11.5", default-features = false } anyhow = "1.0.93" +include_dir = "0.7.4" +mime_guess = "2.0.5" [dev-dependencies] pretty_assertions = "1.4.1" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..27bc30d --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +use std::{fs::create_dir_all, io::Result}; + +/// Create site folder so include_dir macro for assets doesn't throw error in clean repo +fn main() -> Result<()> { + create_dir_all("target/site/")?; + Ok(()) +}