diff --git a/frontend/Makefile.toml b/frontend/Makefile.toml index 26eb996047..4b1c4f9367 100644 --- a/frontend/Makefile.toml +++ b/frontend/Makefile.toml @@ -127,7 +127,6 @@ script_runner = "@shell" BUILD_FLAG = "release" TARGET_OS = "ios" CRATE_TYPE = "staticlib" -BUILD_FLAG = "release" FLUTTER_OUTPUT_DIR = "Release" PRODUCT_EXT = "ipa" diff --git a/frontend/app_flowy/linux/appflowy.desktop.temp b/frontend/app_flowy/linux/appflowy.desktop.temp new file mode 100644 index 0000000000..77bd120524 --- /dev/null +++ b/frontend/app_flowy/linux/appflowy.desktop.temp @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=AppFlowy +Comment=An Open Source Alternative to Notion +Icon=[CHANGE_THIS]/AppFlowy/flowy_logo.svg +Exec=[CHANGE_THIS]/AppFlowy/app_flowy +Categories=Office +Type=Application +Terminal=false \ No newline at end of file diff --git a/frontend/scripts/makefile/flutter.toml b/frontend/scripts/makefile/flutter.toml index c188d3c6bd..f48c1e6255 100644 --- a/frontend/scripts/makefile/flutter.toml +++ b/frontend/scripts/makefile/flutter.toml @@ -14,7 +14,7 @@ run_task = { name = ["flutter-build", "copy-to-product"] } [tasks.appflowy-linux] dependencies = ["flowy-sdk-release"] -run_task = { name = ["flutter-build", "copy-to-product"] } +run_task = { name = ["flutter-build", "copy-to-product", "create-release-archive"] } script_runner = "@shell" [tasks.appflowy-dev] @@ -71,6 +71,9 @@ script = [ product=${PRODUCT_NAME} cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${TARGET_OS}/${LINUX_ARCH}/${BUILD_FLAG}/bundle \ ${output_path}/${product} + + cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/linux/appflowy.desktop.temp ${output_path}/${product} + cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/assets/images/flowy_logo.svg ${output_path}/${product} """, ] script_runner = "@shell" @@ -92,6 +95,33 @@ script = [ ] script_runner = "@duckscript" +# The following tasks will create an archive that will be used on the GitHub Releases section +# The archives are created using different compression programs depending on the target OS +# The archive will be composed of all files that are located in the /Release/AppFlowy directory +[tasks.create-release-archive] +mac_alias = "create-release-archive-macos" +windows_alias = "create-release-archive-windows" +linux_alias = "create-release-archive-linux" + +[tasks.create-release-archive-linux] +script = [ + "cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}/${TARGET_OS}/Release", + "tar -czf ${PRODUCT_NAME}-${TARGET_OS}-x86.tar.gz *" +] + +[tasks.create-release-archive-windows] +script = [ + # TODO + # "cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}/${TARGET_OS}/Release/${PRODUCT_NAME}", + # "tar -czf ${PRODUCT_NAME}-${TARGET_OS}-x86.tar.gz *" +] + +[tasks.create-release-archive-macos] +script = [ + # TODO + # "cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}/${TARGET_OS}/Release/${PRODUCT_NAME}", + # "tar -czf ${PRODUCT_NAME}-${TARGET_OS}-x86.tar.gz *" +] [tasks.flutter-build] script = [