From 295ece01ea0e5054456630dd08e353bf387c0001 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Tue, 4 Mar 2025 20:04:58 +0100 Subject: [PATCH] sqlx update script on mac (#5420) --- backend/update_sqlx.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/backend/update_sqlx.sh b/backend/update_sqlx.sh index 9ee8ab350d..11b5196ad8 100755 --- a/backend/update_sqlx.sh +++ b/backend/update_sqlx.sh @@ -1,3 +1,22 @@ ./substitute_ee_code.sh --dir ../windmill-ee-private + +# Check if running on macOS +if [[ "$(uname)" == "Darwin" ]]; then + echo "Running on macOS - substituting samael..." + # Comment out the version-based samael dependency + sed -i '' 's/^samael = { version="0.0.14", features = \["xmlsec"\] }/#samael = { version="0.0.14", features = ["xmlsec"] }/' Cargo.toml + # Uncomment the git-based samael dependency + sed -i '' 's/^# \(samael = { git="https:\/\/github.com\/njaremko\/samael", rev="464d015e3ae393e4b5dd00b4d6baa1b617de0dd6", features = \["xmlsec"\] }\)/\1/' Cargo.toml +fi + cargo sqlx prepare --workspace -- --all-targets --all-features ./substitute_ee_code.sh -r --dir ../windmill-ee-private + +# Undo the samael changes on macOS +if [[ "$(uname)" == "Darwin" ]]; then + echo "Reverting samael changes..." + # Uncomment the version-based samael dependency + sed -i '' 's/^#samael = { version="0.0.14", features = \["xmlsec"\] }/samael = { version="0.0.14", features = ["xmlsec"] }/' Cargo.toml + # Comment out the git-based samael dependency + sed -i '' 's/^\(samael = { git="https:\/\/github.com\/njaremko\/samael", rev="464d015e3ae393e4b5dd00b4d6baa1b617de0dd6", features = \["xmlsec"\] }\)/# \1/' Cargo.toml +fi