zellij/Makefile.toml

213 lines
6.1 KiB
Makefile
Raw Normal View History

2021-03-26 19:01:22 +03:00
# Global Settings
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_TARGET_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target"
2021-03-26 19:01:22 +03:00
SKIP_TEST = false
ZELLIJ_EXAMPLE_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/example"
ZELLIJ_ASSETS_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/zellij-utils/assets"
2021-03-26 19:01:22 +03:00
2021-04-13 20:14:13 +03:00
# Add clippy to the default flow
[tasks.dev-test-flow]
dependencies = [
"format-flow",
"format-toml-conditioned-flow",
"pre-build",
"build",
"post-build",
"test-flow",
"clippy",
]
2021-03-26 19:01:22 +03:00
# Patching the default flows to skip testing of wasm32-wasi targets
[tasks.pre-test]
condition = { env = { "CARGO_MAKE_CRATE_TARGET_TRIPLE" = "wasm32-wasi" } }
env = { "SKIP_TEST" = true }
[tasks.test]
condition = { env_false = ["SKIP_TEST"] }
dependencies = ["pre-test"]
args = ["test", "--", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
2021-03-26 19:01:22 +03:00
[tasks.post-test]
env = { "SKIP_TEST" = false }
# Running Zellij using the development data directory
2021-03-30 14:49:42 +03:00
[tasks.run]
workspace = false
dependencies = ["build-workspace", "build-dev-data-dir"]
run_task = "launch"
[tasks.build-workspace]
run_task = { name = "build", fork = true }
2021-03-30 14:49:42 +03:00
[tasks.build]
2021-05-24 16:12:22 +03:00
args = ["build"]
[tasks.build-release]
2021-05-24 16:12:22 +03:00
args = ["build", "--release"]
[tasks.build-dev-data-dir]
dependencies = ["build-plugins"]
script_runner = "@duckscript"
script = '''
target_dir = set ${CARGO_TARGET_DIR}
data_dir = set ${target_dir}/dev-data
rm -r ${data_dir}
plugins = glob_array ${target_dir}/wasm32-wasi/debug/*.wasm
mkdir ${data_dir}
mkdir ${data_dir}/plugins
for plugin in ${plugins}
plugin_name = basename ${plugin}
cp ${plugin} ${data_dir}/plugins/${plugin_name}
end
writefile ${data_dir}/VERSION ${CARGO_MAKE_CRATE_VERSION}
'''
[tasks.launch]
command = "cargo"
args = ["run", "--", "--data-dir", "${CARGO_TARGET_DIR}/dev-data/", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
2021-03-30 14:49:42 +03:00
# Simple clippy tweak
[tasks.clippy]
args = ["clippy", "--", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
# Release building and installing Zellij
[tasks.install]
workspace = false
feat(ui): overhauled resize and layout systems * refactor(panes): move to parametric pane sizes * Fixed the simpler errors by casting to usize * The least I can do is pass the formatting check... * Move to stable toolchain * Well, it compiles? * And now it doesn't! ;) * Baseline functionality with the new Dimension type * Working POC for percent-based resizing * REVERT THIS COMMIT – DELETES TESTS * Perfected the discrete resize algorithm * Fixed fixed-size panes * Basic bidirectional resize * feat(resize): finalised parametric resize algorithm * Reduce the logging level a bit * Fixed nested layouts using percents * Bug squishing for implicit sizing * Here is a funky (read: rubbish) rounding approach * And now it's gone again! * Improve discretisation algorithm to fix rounding errors * Fix the last layout bug (maybe?) * Mixed explicit and implied percents work now * Let's pretend that didn't happen... * Make things a bit less crashy * Crash slightly more for now (to find bugs) * Manaually splitting of panes works now * Start moving to percent-based resizes * Everything but fullscreen seems to be working * Fix compilatation errors * Culled a massive amount of border code * Why not pause to please rustfmt? * Turns out I was still missing a few tests... * Bringing back even more tests! * Fix tests and pane boarders * Fix the resize system without gaps * Fix content offset * Fixed a bug with pane closing * Add a hack to fix setting of the viewport * Fix toggling between shared borders and frames * fix(tests): make e2e properly use PaneGeom * style(fmt): make rustfmt happy * Revert unintentional rounding of borders * Purge some old borderless stuff * Fix busted tab-bar shrinking * Update E2E tests * Finish implementing fullscreen! * Don't crash anymore? * Fix (almost) all tests * Fix a lack of tab-stops * All tests passing * I really can't be bothered to debug a CI issue * Tie up loose ends * Knock out some lingering FIXMEs * Continue to clean things up * Change some naming and address FIXMEs * Cull more code + FIXMEs * Refactor of the resize system + polish * Only draw frames when absolutely necessary * Fix the tab-bar crash * Fix rendering of boarders on reattach * Fix resizing at small pane sizes * Deduplicate code in the layout system * Update tab-bar WASM * Fixed the pinching of panes during resize * Unexpose needlessly public type * Add back a lost test * Re-add tab tests and get them to compile * All tabs need layouts * Start fixing tests + bug in main * Stabilize the resize algorithm rounding * All tests from main are now passing * Cull more dead code
2021-08-28 19:46:24 +03:00
dependencies = ["wasm-opt-plugins", "build-release", "manpage"]
script_runner = "@duckscript"
script = '''
if is_dir ${CARGO_MAKE_TASK_ARGS}
trigger_error "You need to specify a full path for the binary, not just a directory!"
else
cp ${CARGO_TARGET_DIR}/release/${CARGO_MAKE_CRATE_NAME} ${CARGO_MAKE_TASK_ARGS}
end
'''
2021-03-26 19:01:22 +03:00
[tasks.build-plugins-release]
env = { "CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS" = ["default-plugins/status-bar", "default-plugins/strider", "default-plugins/tab-bar"] }
run_task = { name = "build-release", fork = true }
2021-03-26 19:01:22 +03:00
[tasks.build-plugins]
env = { "CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS" = ["default-plugins/status-bar", "default-plugins/strider", "default-plugins/tab-bar"] }
run_task = { name = "build", fork = true }
[tasks.wasm-opt-plugins]
feat(ui): overhauled resize and layout systems * refactor(panes): move to parametric pane sizes * Fixed the simpler errors by casting to usize * The least I can do is pass the formatting check... * Move to stable toolchain * Well, it compiles? * And now it doesn't! ;) * Baseline functionality with the new Dimension type * Working POC for percent-based resizing * REVERT THIS COMMIT – DELETES TESTS * Perfected the discrete resize algorithm * Fixed fixed-size panes * Basic bidirectional resize * feat(resize): finalised parametric resize algorithm * Reduce the logging level a bit * Fixed nested layouts using percents * Bug squishing for implicit sizing * Here is a funky (read: rubbish) rounding approach * And now it's gone again! * Improve discretisation algorithm to fix rounding errors * Fix the last layout bug (maybe?) * Mixed explicit and implied percents work now * Let's pretend that didn't happen... * Make things a bit less crashy * Crash slightly more for now (to find bugs) * Manaually splitting of panes works now * Start moving to percent-based resizes * Everything but fullscreen seems to be working * Fix compilatation errors * Culled a massive amount of border code * Why not pause to please rustfmt? * Turns out I was still missing a few tests... * Bringing back even more tests! * Fix tests and pane boarders * Fix the resize system without gaps * Fix content offset * Fixed a bug with pane closing * Add a hack to fix setting of the viewport * Fix toggling between shared borders and frames * fix(tests): make e2e properly use PaneGeom * style(fmt): make rustfmt happy * Revert unintentional rounding of borders * Purge some old borderless stuff * Fix busted tab-bar shrinking * Update E2E tests * Finish implementing fullscreen! * Don't crash anymore? * Fix (almost) all tests * Fix a lack of tab-stops * All tests passing * I really can't be bothered to debug a CI issue * Tie up loose ends * Knock out some lingering FIXMEs * Continue to clean things up * Change some naming and address FIXMEs * Cull more code + FIXMEs * Refactor of the resize system + polish * Only draw frames when absolutely necessary * Fix the tab-bar crash * Fix rendering of boarders on reattach * Fix resizing at small pane sizes * Deduplicate code in the layout system * Update tab-bar WASM * Fixed the pinching of panes during resize * Unexpose needlessly public type * Add back a lost test * Re-add tab tests and get them to compile * All tabs need layouts * Start fixing tests + bug in main * Stabilize the resize algorithm rounding * All tests from main are now passing * Cull more dead code
2021-08-28 19:46:24 +03:00
dependencies = ["build-plugins-release"]
script_runner = "@duckscript"
script = '''
plugins = glob_array ${CARGO_TARGET_DIR}/wasm32-wasi/release/*.wasm
2021-03-26 19:01:22 +03:00
for plugin in ${plugins}
mkdir ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/assets/plugins/
plugin_name = basename ${plugin}
plugin_out = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/assets/plugins/${plugin_name}
if is_path_newer ${plugin} ${plugin_out} or not is_path_exists ${plugin_out}
exec wasm-opt -O ${plugin} -o ${plugin_out}
end
end
'''
2021-03-26 19:01:22 +03:00
[tasks.manpage]
workspace = false
description = "Use mandown crate to create or update man entry from docs/MANPAGES.md"
script = '''
root_dir=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}
mkdir -p ${root_dir}/assets/man
mandown ${root_dir}/docs/MANPAGE.md ZELLIJ 1 > ${root_dir}/assets/man/zellij.1
'''
dependencies = ["install-mandown"]
[tasks.install-mandown]
command = "cargo"
args = ["install", "mandown"]
# copy the example default config from assets directory to a more user facing one
[tasks.update-default-config]
workspace = false
dependencies = []
script_runner = "@duckscript"
script = '''
cp ${ZELLIJ_ASSETS_DIR}/config/default.yaml ${ZELLIJ_EXAMPLE_DIR}/default.yaml
'''
# CI Releasing Zellij
[tasks.ci-build-release]
workspace = false
dependencies = ["setup-cross-compilation", "build-plugins-release", "wasm-opt-plugins", "manpage"]
2021-04-27 01:33:53 +03:00
command = "cross"
args = ["build", "--verbose", "--release", "--target", "${CARGO_MAKE_TASK_ARGS}"]
# Build e2e asset
[tasks.build-e2e]
workspace = false
dependencies = ["build-plugins", "build-dev-data-dir"]
command = "cargo"
args = ["build", "--verbose", "--release", "--target", "x86_64-unknown-linux-musl"]
# Run e2e tests - we mark the e2e tests as "ignored" so they will not be run with the normal ones
[tasks.e2e-test]
workspace = false
feat(ui): overhauled resize and layout systems * refactor(panes): move to parametric pane sizes * Fixed the simpler errors by casting to usize * The least I can do is pass the formatting check... * Move to stable toolchain * Well, it compiles? * And now it doesn't! ;) * Baseline functionality with the new Dimension type * Working POC for percent-based resizing * REVERT THIS COMMIT – DELETES TESTS * Perfected the discrete resize algorithm * Fixed fixed-size panes * Basic bidirectional resize * feat(resize): finalised parametric resize algorithm * Reduce the logging level a bit * Fixed nested layouts using percents * Bug squishing for implicit sizing * Here is a funky (read: rubbish) rounding approach * And now it's gone again! * Improve discretisation algorithm to fix rounding errors * Fix the last layout bug (maybe?) * Mixed explicit and implied percents work now * Let's pretend that didn't happen... * Make things a bit less crashy * Crash slightly more for now (to find bugs) * Manaually splitting of panes works now * Start moving to percent-based resizes * Everything but fullscreen seems to be working * Fix compilatation errors * Culled a massive amount of border code * Why not pause to please rustfmt? * Turns out I was still missing a few tests... * Bringing back even more tests! * Fix tests and pane boarders * Fix the resize system without gaps * Fix content offset * Fixed a bug with pane closing * Add a hack to fix setting of the viewport * Fix toggling between shared borders and frames * fix(tests): make e2e properly use PaneGeom * style(fmt): make rustfmt happy * Revert unintentional rounding of borders * Purge some old borderless stuff * Fix busted tab-bar shrinking * Update E2E tests * Finish implementing fullscreen! * Don't crash anymore? * Fix (almost) all tests * Fix a lack of tab-stops * All tests passing * I really can't be bothered to debug a CI issue * Tie up loose ends * Knock out some lingering FIXMEs * Continue to clean things up * Change some naming and address FIXMEs * Cull more code + FIXMEs * Refactor of the resize system + polish * Only draw frames when absolutely necessary * Fix the tab-bar crash * Fix rendering of boarders on reattach * Fix resizing at small pane sizes * Deduplicate code in the layout system * Update tab-bar WASM * Fixed the pinching of panes during resize * Unexpose needlessly public type * Add back a lost test * Re-add tab tests and get them to compile * All tabs need layouts * Start fixing tests + bug in main * Stabilize the resize algorithm rounding * All tests from main are now passing * Cull more dead code
2021-08-28 19:46:24 +03:00
dependencies = ["build-e2e"]
command = "cargo"
args = ["test", "--", "--ignored", "--nocapture", "--test-threads", "1", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
2021-04-27 01:33:53 +03:00
[tasks.setup-cross-compilation]
command = "cargo"
args = ["install", "cross"]
# Publishing Zellij
[tasks.publish]
clear = true
workspace = false
dependencies = [ "update-default-config", "build-plugins-release", "wasm-opt-plugins", "release-commit"]
run_task = "publish-zellij"
[tasks.release-commit]
dependencies = ["commit-all", "tag-release"]
command = "git"
2021-08-31 11:00:26 +03:00
args = ["push", "--atomic", "upstream", "main", "v${CARGO_MAKE_CRATE_VERSION}"]
[tasks.commit-all]
ignore_errors = true
command = "git"
args = ["commit", "-aem", "chore(release): v${CARGO_MAKE_CRATE_VERSION}"]
[tasks.tag-release]
command = "git"
args = ["tag", "v${CARGO_MAKE_CRATE_VERSION}"]
[tasks.publish-zellij-tile]
ignore_errors = true
cwd = "zellij-tile"
script = "cargo publish && sleep 15"
2021-05-27 10:35:58 +03:00
[tasks.publish-zellij-client]
ignore_errors = true
dependencies = ["publish-zellij-utils"]
2021-05-27 10:35:58 +03:00
cwd = "zellij-client"
script = "cargo publish && sleep 15"
2021-05-27 10:35:58 +03:00
[tasks.publish-zellij-server]
ignore_errors = true
dependencies = ["publish-zellij-utils"]
2021-05-27 10:35:58 +03:00
cwd = "zellij-server"
script = "cargo publish && sleep 15"
2021-05-27 10:35:58 +03:00
[tasks.publish-zellij-utils]
ignore_errors = true
dependencies = ["publish-zellij-tile"]
2021-05-27 10:35:58 +03:00
cwd = "zellij-utils"
script = "cargo publish && sleep 15"
2021-05-27 10:35:58 +03:00
[tasks.publish-zellij-tile-utils]
ignore_errors = true
cwd = "zellij-tile-utils"
script = "cargo publish && sleep 15"
[tasks.publish-zellij]
dependencies = ["publish-zellij-client", "publish-zellij-server", "publish-zellij-utils",]
command = "cargo"
2021-05-04 21:50:27 +03:00
args = ["publish"]