mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
59 lines
1.9 KiB
TOML
59 lines
1.9 KiB
TOML
# cargo make --profile production task
|
|
|
|
[tasks.flowy-sdk]
|
|
category = "Build"
|
|
condition = { profiles = [ "development-mac" ], channels = ["nightly"] }
|
|
dependencies = ["flowy-sdk-build"]
|
|
run_task = { name = ["copy-to-sys-tmpdir"] }
|
|
|
|
[tasks.flowy-sdk-build]
|
|
condition = { channels = ["nightly"] }
|
|
run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
|
|
|
|
[tasks.sdk-build]
|
|
condition = { platforms = ["mac"] }
|
|
description = "Build desktop targets."
|
|
script = [
|
|
"""
|
|
cd rust-lib/
|
|
if [ ${PROD} == true ]
|
|
then
|
|
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DESKTOP_TARGET} --features="flutter","http_server"
|
|
else
|
|
cargo build --package=dart-ffi --target ${DESKTOP_TARGET} --features="flutter","http_server"
|
|
fi
|
|
cd ../
|
|
""",
|
|
]
|
|
|
|
|
|
[tasks.post-desktop]
|
|
private = true
|
|
condition = { platforms = ["mac"] }
|
|
script = [
|
|
"""
|
|
echo "🚀 🚀 🚀 Flowy-SDK build success"
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/x86_64-apple-darwin/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib \
|
|
${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages/flowy_sdk/macos/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib
|
|
""",
|
|
"""
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
|
${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages/flowy_sdk/macos/Classes/binding.h
|
|
""",
|
|
]
|
|
script_runner = "@duckscript"
|
|
|
|
[tasks.copy-to-sys-tmpdir]
|
|
private = true
|
|
condition = { platforms = ["mac"] }
|
|
script = [
|
|
"""
|
|
# post the dylib target_path that use for flutter unit test
|
|
target_path = set ${TMPDIR}/appflowy_client/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib
|
|
rm ${target_path}
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/x86_64-apple-darwin/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}
|
|
""",
|
|
]
|
|
script_runner = "@duckscript"
|
|
|