You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
ci: fix the dist build assets path
This commit is contained in:
@ -70,6 +70,9 @@ indoc = "2.0.3"
|
||||
[features]
|
||||
default = ["jaeger", "zipkin", "webpki-roots", "policy-cache"]
|
||||
|
||||
# Features used for the prebuilt binaries
|
||||
dist = ["otlp", "jaeger", "zipkin", "prometheus", "policy-cache", "native-roots", "mas-config/dist"]
|
||||
|
||||
# Features used in the Docker image
|
||||
docker = ["otlp", "jaeger", "zipkin", "prometheus", "native-roots", "mas-config/docker"]
|
||||
|
||||
|
@ -37,6 +37,7 @@ mas-iana = { path = "../iana" }
|
||||
|
||||
[features]
|
||||
docker = []
|
||||
dist = []
|
||||
|
||||
[[bin]]
|
||||
name = "schema"
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
//! Application configuration logic
|
||||
|
||||
#[cfg(all(feature = "docker", feature = "dist"))]
|
||||
compile_error!("Only one of the `docker` and `dist` features can be enabled at once");
|
||||
|
||||
pub(crate) mod schema;
|
||||
mod sections;
|
||||
pub(crate) mod util;
|
||||
|
@ -45,7 +45,7 @@ fn http_address_example_4() -> &'static str {
|
||||
"0.0.0.0:8080"
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "docker"))]
|
||||
#[cfg(not(any(feature = "docker", feature = "dist")))]
|
||||
fn http_listener_assets_path_default() -> Utf8PathBuf {
|
||||
"./frontend/dist/".into()
|
||||
}
|
||||
@ -55,6 +55,11 @@ fn http_listener_assets_path_default() -> Utf8PathBuf {
|
||||
"/usr/local/share/mas-cli/assets/".into()
|
||||
}
|
||||
|
||||
#[cfg(feature = "dist")]
|
||||
fn http_listener_assets_path_default() -> Utf8PathBuf {
|
||||
"./share/assets/".into()
|
||||
}
|
||||
|
||||
/// Kind of socket
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema, Clone, Copy)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
|
@ -21,7 +21,7 @@ use serde_with::serde_as;
|
||||
|
||||
use super::ConfigurationSection;
|
||||
|
||||
#[cfg(not(feature = "docker"))]
|
||||
#[cfg(not(any(feature = "docker", feature = "dist")))]
|
||||
fn default_policy_path() -> Utf8PathBuf {
|
||||
"./policies/policy.wasm".into()
|
||||
}
|
||||
@ -31,6 +31,11 @@ fn default_policy_path() -> Utf8PathBuf {
|
||||
"/usr/local/share/mas-cli/policy.wasm".into()
|
||||
}
|
||||
|
||||
#[cfg(feature = "dist")]
|
||||
fn default_policy_path() -> Utf8PathBuf {
|
||||
"./share/policy.wasm".into()
|
||||
}
|
||||
|
||||
fn default_client_registration_endpoint() -> String {
|
||||
"client_registration/violation".to_owned()
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::ConfigurationSection;
|
||||
|
||||
#[cfg(not(feature = "docker"))]
|
||||
#[cfg(not(any(feature = "docker", feature = "dist")))]
|
||||
fn default_path() -> Utf8PathBuf {
|
||||
"./templates/".into()
|
||||
}
|
||||
@ -30,7 +30,12 @@ fn default_path() -> Utf8PathBuf {
|
||||
"/usr/local/share/mas-cli/templates/".into()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "docker"))]
|
||||
#[cfg(feature = "dist")]
|
||||
fn default_path() -> Utf8PathBuf {
|
||||
"./share/templates/".into()
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "docker", feature = "dist")))]
|
||||
fn default_assets_path() -> Utf8PathBuf {
|
||||
"./frontend/dist/manifest.json".into()
|
||||
}
|
||||
@ -40,6 +45,11 @@ fn default_assets_path() -> Utf8PathBuf {
|
||||
"/usr/local/share/mas-cli/manifest.json".into()
|
||||
}
|
||||
|
||||
#[cfg(feature = "dist")]
|
||||
fn default_assets_path() -> Utf8PathBuf {
|
||||
"./share/manifest.json".into()
|
||||
}
|
||||
|
||||
/// Configuration related to templates
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema, Clone)]
|
||||
pub struct TemplatesConfig {
|
||||
|
Reference in New Issue
Block a user