mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
add frontend folder
This commit is contained in:
132
frontend/scripts/makefile/desktop.toml
Normal file
132
frontend/scripts/makefile/desktop.toml
Normal file
@ -0,0 +1,132 @@
|
||||
# cargo make --profile production task
|
||||
|
||||
# Run the task with profile, e.g.
|
||||
# cargo make --profile development-mac flowy-sdk-dev
|
||||
# cargo make --profile production-desktop-windows-x86 flowy-sdk-dev
|
||||
|
||||
[tasks.env_check]
|
||||
dependencies = ["echo_env"]
|
||||
condition = { env_set = [ "BUILD_FLAG", "RUST_COMPILE_TARGET", "CRATE_TYPE", "TARGET_OS"], channels = ["nightly"] }
|
||||
|
||||
[tasks.flowy-sdk-dev]
|
||||
mac_alias = "flowy-sdk-dev-macos"
|
||||
windows_alias = "flowy-sdk-dev-windows"
|
||||
linux_alias = "flowy-sdk-dev-linux"
|
||||
|
||||
[tasks.flowy-sdk-dev-macos]
|
||||
category = "Build"
|
||||
dependencies = ["env_check"]
|
||||
run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
|
||||
|
||||
[tasks.flowy-sdk-dev-windows]
|
||||
category = "Build"
|
||||
dependencies = ["env_check"]
|
||||
run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
|
||||
|
||||
[tasks.flowy-sdk-dev-linux]
|
||||
category = "Build"
|
||||
dependencies = ["env_check"]
|
||||
run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
|
||||
|
||||
#
|
||||
[tasks.sdk-build]
|
||||
private = true
|
||||
script = [
|
||||
"""
|
||||
cd rust-lib/
|
||||
echo cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features=${FEATURES}
|
||||
cargo build --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features=${FEATURES}
|
||||
cd ../
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
#
|
||||
[tasks.flowy-sdk-release]
|
||||
description = "Build flowy sdk in release mode"
|
||||
category = "Build"
|
||||
dependencies = ["env_check"]
|
||||
run_task = { name = ["setup-crate-type","sdk-release-build", "post-desktop", "restore-crate-type"] }
|
||||
|
||||
#
|
||||
[tasks.sdk-release-build]
|
||||
script = [
|
||||
"""
|
||||
cd rust-lib/
|
||||
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${RUST_COMPILE_TARGET} --features=${FEATURES}
|
||||
cd ../
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
#
|
||||
[tasks.post-desktop]
|
||||
mac_alias = "post-desktop-macos"
|
||||
windows_alias = "post-desktop-windows"
|
||||
linux_alias = "post-desktop-linux"
|
||||
|
||||
[tasks.post-desktop-macos]
|
||||
private = true
|
||||
script = [
|
||||
"""
|
||||
echo "🚀 🚀 🚀 Flowy-SDK(macOS) build success"
|
||||
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT} \
|
||||
${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages/flowy_sdk/${TARGET_OS}/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT}
|
||||
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
||||
${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages/flowy_sdk/${TARGET_OS}/Classes/binding.h
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
|
||||
[tasks.post-desktop-windows]
|
||||
private = true
|
||||
script = [
|
||||
"""
|
||||
echo "🚀 🚀 🚀 Flowy-SDK(windows) build success"
|
||||
dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/windows/flutter/dart_ffi
|
||||
|
||||
# copy dll
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT} \
|
||||
${dart_ffi_dir}/${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT}
|
||||
|
||||
# copy binding.h
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
||||
${dart_ffi_dir}/binding.h
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.post-desktop-linux]
|
||||
private = true
|
||||
script = [
|
||||
"""
|
||||
echo "🚀 🚀 🚀 Flowy-SDK(linux) build success"
|
||||
dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/linux/flutter/dart_ffi
|
||||
|
||||
# copy dll
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT} \
|
||||
${dart_ffi_dir}/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT}
|
||||
|
||||
# copy binding.h
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/${CARGO_MAKE_CRATE_NAME}/binding.h \
|
||||
${dart_ffi_dir}/binding.h
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
#
|
||||
[tasks.copy-to-sys-tmpdir]
|
||||
private = true
|
||||
condition = { profiles = [ "development-mac" ], platforms = ["mac"] }
|
||||
script = [
|
||||
"""
|
||||
# post the dylib target_path that use for flutter unit test
|
||||
target_path = set ${TMPDIR}/appflowy/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT}
|
||||
rm ${target_path}
|
||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/lib${CARGO_MAKE_CRATE_FS_NAME}.${SDK_EXT} ${target_path}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
10
frontend/scripts/makefile/docker.toml
Normal file
10
frontend/scripts/makefile/docker.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[tasks.show_usage]
|
||||
script = """
|
||||
docker system df -v
|
||||
# docker volume rm xxxxx
|
||||
docker volume prune
|
||||
"""
|
||||
|
||||
#docker container ls -al
|
||||
#docker stop clever_mayer
|
||||
#docker rm clever_mayer
|
159
frontend/scripts/makefile/env.toml
Normal file
159
frontend/scripts/makefile/env.toml
Normal file
@ -0,0 +1,159 @@
|
||||
[tasks.flowy_dev]
|
||||
run_task = { name = ["install_prerequests","install_diesel", "install_protobuf"] }
|
||||
|
||||
[tasks.install_windows_deps.windows]
|
||||
dependencies=["check_duckscript_installation", "check_visual_studio_installation", "check_vcpkg", "install_vcpkg_sqlite", "install_rust_vcpkg_cli"]
|
||||
|
||||
[tasks.check_visual_studio_installation.windows]
|
||||
script = """
|
||||
output = exec powershell -Command "Get-CimInstance MSFT_VSInstance | select -ExpandProperty Version"
|
||||
stdout = set ${output.stdout}
|
||||
pos = last_indexof ${stdout} .
|
||||
new_str = substring ${stdout} 0 ${pos}
|
||||
newer = semver_is_newer ${new_str} 16.11.0
|
||||
assert ${newer} "Visual studio 2019 is not installed or version is lower than 16.11.0"
|
||||
"""
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.check_duckscript_installation.windows]
|
||||
script = """
|
||||
@echo off
|
||||
@duck -h > nul
|
||||
if %errorlevel% GTR 0 (
|
||||
echo Please install duckscript at first: cargo install --force duckscript_cli
|
||||
exit -1
|
||||
)
|
||||
"""
|
||||
|
||||
[tasks.check_vcpkg.windows]
|
||||
script = """
|
||||
ret = which vcpkg
|
||||
if is_empty ${ret}
|
||||
echo "Please install vcpkg on windows at first. Make sure to put it into PATH env var"
|
||||
echo "See: https://github.com/microsoft/vcpkg#quick-start-windows"
|
||||
exit -1
|
||||
end
|
||||
"""
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.install_vcpkg_sqlite.windows]
|
||||
script = """
|
||||
vcpkg install sqlite3:x64-windows-static-md
|
||||
"""
|
||||
|
||||
[tasks.install_rust_vcpkg_cli.windows]
|
||||
script = """
|
||||
exec cargo install vcpkg_cli
|
||||
output = exec vcpkg_cli probe sqlite3
|
||||
stdout = set ${output.stdout}
|
||||
stderr = set ${output.stderr}
|
||||
ret = indexof ${stdout} "Failed:"
|
||||
assert_eq ${ret} "" ${stdout}
|
||||
"""
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.install_diesel]
|
||||
script = """
|
||||
cargo install diesel_cli --no-default-features --features sqlite
|
||||
"""
|
||||
|
||||
[tasks.install_diesel.windows]
|
||||
script = """
|
||||
cargo install diesel_cli --no-default-features --features sqlite
|
||||
"""
|
||||
dependencies = ["check_vcpkg"]
|
||||
|
||||
[tasks.install_targets]
|
||||
script = """
|
||||
rustup target add x86_64-apple-ios
|
||||
rustup target add x86_64-apple-darwin
|
||||
rustup target add aarch64-apple-ios
|
||||
rustup target add aarch64-apple-darwin
|
||||
rustup target add x86_64-pc-windows-msvc
|
||||
rustup target add x86_64-pc-windows-msvc
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
"""
|
||||
|
||||
[tasks.install_prerequests]
|
||||
dependencies=["install_targets"]
|
||||
|
||||
[tasks.install_prerequests.windows]
|
||||
dependencies=["install_targets", "install_windows_deps"]
|
||||
|
||||
[tasks.install_protobuf]
|
||||
script = """
|
||||
# Custom dart:
|
||||
#brew tap dart-lang/dart
|
||||
#brew install dart
|
||||
#pub global activate protoc_plugin
|
||||
|
||||
#https://pub.dev/packages/protoc_plugin
|
||||
dart pub global activate protoc_plugin
|
||||
|
||||
cargo install --version 2.20.0 protobuf-codegen
|
||||
"""
|
||||
|
||||
[tasks.install_protobuf.windows]
|
||||
script = """
|
||||
ret = which dart
|
||||
if is_empty ${ret}
|
||||
echo Please make sure flutter/dart is properly installed and in PATH env var
|
||||
exit -1
|
||||
end
|
||||
ret = which protoc-gen-dart
|
||||
if is_empty ${ret}
|
||||
dart pub global activate protoc_plugin
|
||||
home_dir = get_home_dir
|
||||
echo Please add '${home_dir}\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\bin' into PATH env var
|
||||
exit -1
|
||||
end
|
||||
exec cargo install --version 2.22.1 protobuf-codegen
|
||||
"""
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.install_tools]
|
||||
script = """
|
||||
rustup component add rustfmt
|
||||
cargo install cargo-expand
|
||||
cargo install cargo-watch
|
||||
cargo install cargo-cache
|
||||
cargo install bunyan
|
||||
"""
|
||||
|
||||
[tasks.install_cocoapods]
|
||||
script = """
|
||||
# execute "xcode-select --install" before if "extconf.rb failed" error occurs
|
||||
sudo gem install cocoapods
|
||||
"""
|
||||
|
||||
[tasks.install_rbenv]
|
||||
script = """
|
||||
brew install rbenv
|
||||
rbenv init
|
||||
rbenv install 2.7.1
|
||||
rbenv global 2.7.1
|
||||
|
||||
# https://github.com/rbenv/rbenv
|
||||
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
|
||||
"""
|
||||
|
||||
[tasks.install_fish]
|
||||
script = """
|
||||
brew install fish
|
||||
|
||||
# https://stackoverflow.com/questions/26208231/modifying-path-with-fish-shell
|
||||
# Export the PATH using the command:
|
||||
# set -Ua fish_user_paths the_path_you_want_to_export
|
||||
"""
|
||||
|
||||
[tasks.install_flutter]
|
||||
script = """
|
||||
ret = which flutter
|
||||
if is_empty ${ret}
|
||||
echo "[❤️] Follow the https://flutter.dev/docs/get-started/install instructions to install the flutter, skip if you already installed."
|
||||
echo "Switch to dev channel with command: flutter channel dev"
|
||||
exit -1
|
||||
end
|
||||
"""
|
||||
script_runner = "@duckscript"
|
||||
|
128
frontend/scripts/makefile/flutter.toml
Normal file
128
frontend/scripts/makefile/flutter.toml
Normal file
@ -0,0 +1,128 @@
|
||||
[tasks.appflowy]
|
||||
mac_alias = "appflowy-macos"
|
||||
windows_alias = "appflowy-windows"
|
||||
linux_alias = "appflowy-linux"
|
||||
|
||||
[tasks.appflowy-macos]
|
||||
dependencies = ["flowy-sdk-release"]
|
||||
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.appflowy-windows]
|
||||
dependencies = ["flowy-sdk-release"]
|
||||
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||
|
||||
[tasks.appflowy-linux]
|
||||
dependencies = ["flowy-sdk-release"]
|
||||
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.copy-to-product]
|
||||
mac_alias = "copy-to-product-macos"
|
||||
windows_alias = "copy-to-product-windows"
|
||||
linux_alias = "copy-to-product-linux"
|
||||
|
||||
[tasks.copy-to-product-macos]
|
||||
script = [
|
||||
"""
|
||||
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
|
||||
output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
|
||||
if [ -d "${output_path}" ]; then
|
||||
rm -rf ${output_path}/
|
||||
fi
|
||||
mkdir -p ${output_path}
|
||||
|
||||
product=${PRODUCT_NAME}.${PRODUCT_EXT}
|
||||
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \
|
||||
${output_path}/${product}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.copy-to-product-linux]
|
||||
script = [
|
||||
"""
|
||||
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
|
||||
output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
|
||||
if [ -d "${output_path}" ]; then
|
||||
rm -rf ${output_path}/
|
||||
fi
|
||||
mkdir -p ${output_path}
|
||||
|
||||
product=${PRODUCT_NAME}
|
||||
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/x64/${BUILD_FLAG}/bundle \
|
||||
${output_path}/${product}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.copy-to-product-windows]
|
||||
script = [
|
||||
"""
|
||||
product_path= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
|
||||
output_path= set ${product_path}/${TARGET_OS}
|
||||
if is_path_exists ${output_path}
|
||||
rm -r ${output_path}/
|
||||
fi
|
||||
mkdir ${output_path}
|
||||
|
||||
product= set ${PRODUCT_NAME}
|
||||
glob_cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/runner/${FLUTTER_OUTPUT_DIR}/**/* \
|
||||
${output_path}/${product}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
|
||||
[tasks.flutter-build]
|
||||
script = [
|
||||
"""
|
||||
cd app_flowy/
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${VERSION}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.flutter-build.linux]
|
||||
script = [
|
||||
"""
|
||||
cd app_flowy/
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter build ${TARGET_OS} --${BUILD_FLAG}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.flutter-build.windows]
|
||||
script = [
|
||||
"""
|
||||
cd app_flowy
|
||||
exec cmd.exe /c flutter clean
|
||||
exec cmd.exe /c flutter pub get
|
||||
exec cmd.exe /c flutter build ${TARGET_OS} --${BUILD_FLAG}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
[tasks.freeze_setup]
|
||||
script = [
|
||||
"""
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter pub run build_runner build --delete-conflicting-outputs
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.freeze_watch]
|
||||
script = [
|
||||
"""
|
||||
flutter pub run build_runner watch
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
|
79
frontend/scripts/makefile/protobuf.toml
Normal file
79
frontend/scripts/makefile/protobuf.toml
Normal file
@ -0,0 +1,79 @@
|
||||
|
||||
[tasks.pb]
|
||||
dependencies = ["gen_pb_file"]
|
||||
|
||||
[tasks.gen_pb_file]
|
||||
script = [
|
||||
"""
|
||||
flowy_tool=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/scripts/flowy-tool/Cargo.toml
|
||||
rust_source=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/
|
||||
rust_lib=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib
|
||||
flutter_lib=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages
|
||||
|
||||
derive_meta=${rust_lib}/flowy-derive/src/derive_cache/derive_cache.rs
|
||||
flutter_package_lib=${flutter_lib}/flowy_sdk/lib
|
||||
|
||||
cargo run \
|
||||
--manifest-path ${flowy_tool} pb-gen \
|
||||
--rust_source=${rust_source} \
|
||||
--derive_meta=${derive_meta} \
|
||||
--flutter_package_lib=${flutter_package_lib}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
|
||||
[tasks.gen_pb_file.windows]
|
||||
script = [
|
||||
"""
|
||||
flowy_tool=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/scripts/flowy-tool/Cargo.toml
|
||||
rust_source=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/
|
||||
rust_lib=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib
|
||||
flutter_lib=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages
|
||||
|
||||
derive_meta=set ${rust_lib}/flowy-derive/src/derive_cache/derive_cache.rs
|
||||
flutter_package_lib=set ${flutter_lib}/flowy_sdk/lib
|
||||
|
||||
exec cmd /c cargo run \
|
||||
--manifest-path ${flowy_tool} pb-gen \
|
||||
--rust_source=${rust_source} \
|
||||
--derive_meta=${derive_meta} \
|
||||
--flutter_package_lib=${flutter_package_lib}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
||||
|
||||
|
||||
[tasks.gen_dart_event]
|
||||
script = [
|
||||
"""
|
||||
flowy_tool=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/scripts/flowy-tool/Cargo.toml
|
||||
flutter_lib=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages
|
||||
|
||||
rust_source=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/
|
||||
output=${flutter_lib}/flowy_sdk/lib/dispatch/code_gen.dart
|
||||
|
||||
cargo run \
|
||||
--manifest-path ${flowy_tool} dart-event \
|
||||
--rust_source=${rust_source} \
|
||||
--output=${output}
|
||||
""",
|
||||
]
|
||||
script_runner = "@shell"
|
||||
|
||||
[tasks.gen_dart_event.windows]
|
||||
script = [
|
||||
"""
|
||||
flowy_tool=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/scripts/flowy-tool/Cargo.toml
|
||||
flutter_lib=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packages
|
||||
|
||||
rust_source=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/
|
||||
output=set ${flutter_lib}/flowy_sdk/lib/dispatch/code_gen.dart
|
||||
|
||||
exec cmd.exe /c cargo run \
|
||||
--manifest-path ${flowy_tool} dart-event \
|
||||
--rust_source=${rust_source} \
|
||||
--output=${output}
|
||||
""",
|
||||
]
|
||||
script_runner = "@duckscript"
|
30
frontend/scripts/makefile/tests.toml
Normal file
30
frontend/scripts/makefile/tests.toml
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
[tasks.test_local]
|
||||
category = "Build"
|
||||
dependencies = ["rm_cache"]
|
||||
description = "Build desktop targets."
|
||||
script = '''
|
||||
cd rust-lib
|
||||
cargo test
|
||||
'''
|
||||
|
||||
|
||||
[tasks.test_remote]
|
||||
dependencies = ["rm_cache"]
|
||||
script = """
|
||||
cd rust-lib
|
||||
cargo test --features "flowy-workspace/http_server","flowy-user/http_server"
|
||||
"""
|
||||
|
||||
|
||||
[tasks.run_server]
|
||||
script = """
|
||||
cd backend
|
||||
cargo run
|
||||
"""
|
||||
|
||||
|
||||
[tasks.rm_cache]
|
||||
script = """
|
||||
rm -rf rust-lib/flowy-test/temp
|
||||
"""
|
Reference in New Issue
Block a user