mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
53 lines
1.7 KiB
TOML
53 lines
1.7 KiB
TOML
# cargo make --profile production task
|
|
|
|
[tasks.desktop]
|
|
category = "Build"
|
|
condition = { profiles = [ "development-mac" ], channels = ["nightly"] }
|
|
run_task = { name = ["setup-crate-type","desktop-build", "post-desktop", "restore-crate-type"] }
|
|
|
|
[tasks.desktop-release]
|
|
condition = { channels = ["nightly"] }
|
|
run_task = "desktop-build"
|
|
|
|
[tasks.desktop-build]
|
|
category = "Build"
|
|
condition = { platforms = ["mac"], env_true = ["DEV"] }
|
|
description = "Build desktop targets."
|
|
script = [
|
|
"""
|
|
cd rust-lib/
|
|
cargo build --package=dart-ffi --target ${DESKTOP_TARGET} --features="observable","http_server"
|
|
cd ../
|
|
""",
|
|
]
|
|
|
|
[tasks.post-desktop]
|
|
condition = { platforms = ["mac"] }
|
|
script = [
|
|
"""
|
|
echo "🚀 🚀 🚀 Flowy-SDK build success"
|
|
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/x86_64-apple-darwin/${LIB_OUT_DIR}/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
|
|
""",
|
|
"""
|
|
# 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/${LIB_OUT_DIR}/lib${CARGO_MAKE_CRATE_FS_NAME}.dylib ${target_path}
|
|
""",
|
|
]
|
|
script_runner = "@duckscript"
|
|
|
|
#[tasks.export-env]
|
|
#script = [
|
|
# """
|
|
# export MACOSX_DEPLOYMENT_TARGET=10.11
|
|
# """,
|
|
#]
|
|
#script_runner = "@shell"
|
|
|