Skip to content

Commit

Permalink
feature(release): Copy default config to the examples folder on release
Browse files Browse the repository at this point in the history
  • Loading branch information
a-kenji committed Sep 21, 2021
1 parent 9de73d2 commit c7286d1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_TARGET_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target"
SKIP_TEST = false
ZELLIJ_EXAMPLE_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/example"
ZELLIJ_ASSETS_DIR = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/zellij-utils/assets"

# Add clippy to the default flow
[tasks.dev-test-flow]
Expand Down Expand Up @@ -118,6 +120,16 @@ dependencies = ["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
Expand Down Expand Up @@ -193,6 +205,6 @@ cwd = "zellij-tile-utils"
script = "cargo publish && sleep 15"

[tasks.publish-zellij]
dependencies = ["publish-zellij-client", "publish-zellij-server", "publish-zellij-utils"]
dependencies = ["publish-zellij-client", "publish-zellij-server", "publish-zellij-utils", "update-default-config"]
command = "cargo"
args = ["publish"]

0 comments on commit c7286d1

Please sign in to comment.