2021-05-27 20:05:45 +00:00
|
|
|
[config]
|
|
|
|
default_to_workspace = false
|
|
|
|
|
2021-06-05 17:10:31 +00:00
|
|
|
[tasks.build-debug]
|
|
|
|
command = "cargo"
|
|
|
|
args = ["build"]
|
|
|
|
|
|
|
|
# TODO: we need to pass the version (debug/release) to the create-bundle task
|
|
|
|
[tasks.create-bundle]
|
|
|
|
script = '''
|
|
|
|
TARGET_DIR=target/mac/Espanso.app
|
|
|
|
|
2021-06-05 20:26:08 +00:00
|
|
|
rm -Rf $TARGET_DIR
|
|
|
|
|
2021-06-05 17:10:31 +00:00
|
|
|
VERSION=$(cat espanso/Cargo.toml | grep version | head -1 | awk -F '"' '{ print $2 }')
|
|
|
|
|
|
|
|
mkdir -p $TARGET_DIR/Contents
|
|
|
|
mkdir -p $TARGET_DIR/Contents/MacOS
|
|
|
|
mkdir -p $TARGET_DIR/Contents/Resources
|
|
|
|
|
|
|
|
sed -e "s/VERSION/$VERSION/" espanso/src/res/macos/Info.plist > $TARGET_DIR/Contents/Info.plist
|
|
|
|
|
|
|
|
/bin/echo "APPL????" > $TARGET_DIR/Contents/PkgInfo
|
|
|
|
|
|
|
|
cp -f espanso/src/res/macos/icon.icns $TARGET_DIR/Contents/Resources/icon.icns
|
|
|
|
cp -f target/debug/espanso $TARGET_DIR/Contents/MacOS/espanso
|
|
|
|
'''
|
|
|
|
dependencies=["build-debug"]
|
|
|
|
|
|
|
|
[tasks.run-debug-bundle]
|
|
|
|
command="target/mac/Espanso.app/Contents/MacOS/espanso"
|
|
|
|
args=["${@}"]
|
|
|
|
dependencies=["create-bundle"]
|
|
|
|
|
2021-05-27 20:05:45 +00:00
|
|
|
[tasks.test]
|
|
|
|
command = "cargo"
|
2021-06-25 16:57:17 +00:00
|
|
|
args = ["test", "--workspace", "--exclude", "espanso-modulo", "--exclude", "espanso-ipc", "--no-default-features"]
|
2021-06-02 19:52:08 +00:00
|
|
|
|
|
|
|
[tasks.test-output]
|
|
|
|
command = "cargo"
|
2021-06-25 16:57:17 +00:00
|
|
|
args = ["test", "--workspace", "--exclude", "espanso-modulo", "--exclude", "espanso-ipc", "--no-default-features", "--", "--nocapture"]
|