use preconditions in the taskfile

This commit is contained in:
Yanick Champoux 2025-02-01 11:39:09 -05:00
parent 7401530bb3
commit 3d7701985a

View File

@ -42,12 +42,14 @@ tasks:
integrate:
deps: [checks]
preconditions:
- sh: git is-clean
msg: Workspace is not clean
- sh: git diff-ls {{.PARENT_BRANCH}} | grep test
msg: No test added
- sh: git diff-ls main | grep .changeset/
msg: No new changeset
cmds:
- git is-clean
# did we had tests?
- git diff-ls {{.PARENT_BRANCH}} | grep test
# a new changeset
- git diff-ls main | grep .changeset/
- git checkout {{.PARENT_BRANCH}}
- git weld -