From af828dc48e4c74d3ddce2a96088553a707314d30 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 17 May 2023 23:03:28 +0200 Subject: [PATCH 1/2] fix: bundle sqlite3 --- Cargo.lock | 2 ++ Cargo.toml | 2 ++ src/build.rs => build.rs | 0 src/models.rs | 0 4 files changed, 4 insertions(+) rename src/build.rs => build.rs (100%) delete mode 100644 src/models.rs diff --git a/Cargo.lock b/Cargo.lock index b8388a2..1237a05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,7 @@ dependencies = [ "chrono", "diesel", "diesel_migrations", + "libsqlite3-sys", "poise", "tokio", "uuid", @@ -835,6 +836,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" dependencies = [ + "cc", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index cde15dc..518d125 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,3 +24,5 @@ poise = "0.5.5" async-minecraft-ping = "0.8.0" diesel = { version = "2.0.4", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "r2d2"] } diesel_migrations = { version = "2.0.0", features = [ "sqlite" ] } +# Force sqlite3 to be bundled, allowing for a fully static binary +libsqlite3-sys = { version = "*", features = ["bundled"] } diff --git a/src/build.rs b/build.rs similarity index 100% rename from src/build.rs rename to build.rs diff --git a/src/models.rs b/src/models.rs deleted file mode 100644 index e69de29..0000000 From 42d1fe82125f2da7869f9f3c58cb0fe1a6d21d28 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 17 May 2023 23:18:54 +0200 Subject: [PATCH 2/2] feat(ci): add deploy --- .woodpecker/deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .woodpecker/deploy.yml diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml new file mode 100644 index 0000000..1fd44e2 --- /dev/null +++ b/.woodpecker/deploy.yml @@ -0,0 +1,22 @@ +platform: 'linux/amd64' +branches: 'main' + +pipeline: + release: + image: 'plugins/docker' + settings: + registry: 'git.rustybever.be' + repo: 'git.rustybever.be/chewing_bever/affy' + tag: + - 'latest' + mtu: 1300 + secrets: + - 'docker_username' + - 'docker_password' + + deploy: + image: 'curlimages/curl' + secrets: + - 'webhook' + commands: + - curl -XPOST --fail -s "$WEBHOOK"