From d98a2ac802ce5e7265e9ba040b229610a894efe7 Mon Sep 17 00:00:00 2001 From: despiegk Date: Thu, 8 May 2025 06:26:11 +0300 Subject: [PATCH] ... --- Cargo.toml | 7 +++++-- start.sh | 8 ++++++++ start_with_gitea.sh | 10 ++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 start.sh create mode 100755 start_with_gitea.sh diff --git a/Cargo.toml b/Cargo.toml index 2f8ae69..169db7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,11 @@ futures-util = "0.3" num_cpus = "1.15" bcrypt = "0.14" uuid = { version = "1.3", features = ["v4", "serde"] } -oauth2 = "4.3" -reqwest = { version = "0.11", features = ["json"] } +oauth2 = { version = "4.3", optional = true } +reqwest = { version = "0.11", features = ["json"], optional = true } + +[features] +gitea = ["oauth2", "reqwest"] [dev-dependencies] actix-rt = "2.8" diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..c44f8c2 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Get the directory of the script and change to it +cd "$(dirname "$0")" + +export SECRET_KEY=1234 + +cargo run diff --git a/start_with_gitea.sh b/start_with_gitea.sh new file mode 100755 index 0000000..0a9073f --- /dev/null +++ b/start_with_gitea.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Get the directory of the script and change to it +cd "$(dirname "$0")" + +export GITEA_CLIENT_ID="your_client_id" +export GITEA_CLIENT_SECRET="your_client_secret" +export GITEA_INSTANCE_URL="https://gitea.example.com" +export APP_URL="http://localhost:9999" +cargo run --features gitea