mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 07:35:03 +01:00
fix(build): use OUT_DIR for migration files (#1088)
- write generated migration files to OUT_DIR instead of source directory - copy migration SQL files to OUT_DIR for inclusion in build artifacts - use absolute paths from OUT_DIR in include_str! macros - update consumer modules to include from OUT_DIR using concat! macro these changes enable cdk to support nix sandbox builds
This commit is contained in:
@@ -54,8 +54,9 @@ where
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod migrations;
|
||||
|
||||
mod migrations {
|
||||
include!(concat!(env!("OUT_DIR"), "/migrations_mint_auth.rs"));
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl<RM> MintAuthTransaction<database::Error> for SQLTransaction<RM>
|
||||
|
||||
@@ -51,8 +51,9 @@ use crate::{
|
||||
mod auth;
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod migrations;
|
||||
|
||||
mod migrations {
|
||||
include!(concat!(env!("OUT_DIR"), "/migrations_mint.rs"));
|
||||
}
|
||||
|
||||
#[cfg(feature = "auth")]
|
||||
pub use auth::SQLMintAuthDatabase;
|
||||
|
||||
@@ -28,7 +28,9 @@ use crate::{
|
||||
};
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod migrations;
|
||||
mod migrations {
|
||||
include!(concat!(env!("OUT_DIR"), "/migrations_wallet.rs"));
|
||||
}
|
||||
|
||||
/// Wallet SQLite Database
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user