allow to skip preconditions
This commit is contained in:
parent
3d7701985a
commit
9adaa71b2a
@ -3,6 +3,9 @@
|
||||
# tea releases c --asset releases/updux-4.0.0-alpha.2.tgz -p --title v4.0.0-alpha.2 --tag v4.0.0-alpha.2
|
||||
version: '3'
|
||||
|
||||
env:
|
||||
SHELL: /usr/local/bin/fish
|
||||
|
||||
vars:
|
||||
PARENT_BRANCH: main
|
||||
|
||||
@ -42,13 +45,17 @@ tasks:
|
||||
|
||||
integrate:
|
||||
deps: [checks]
|
||||
env:
|
||||
NO_NEW_TESTS: '{{.NO_NEW_TESTS}}'
|
||||
NO_CHANGELOG: '{{.NO_CHANGELOG}}'
|
||||
PARENT_BRANCH: '{{.PARENT_BRANCH}}'
|
||||
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
|
||||
- sh: ./contrib/check_new_tests.fish
|
||||
msg: No test added (NO_NEW_TESTS to disable)
|
||||
- sh: ./contrib/check_changelog.fish
|
||||
msg: No new changeset (NO_CHANGELOG to disable)
|
||||
cmds:
|
||||
- git checkout {{.PARENT_BRANCH}}
|
||||
- git weld -
|
||||
@ -57,6 +64,16 @@ tasks:
|
||||
|
||||
test:dev: vitest src
|
||||
|
||||
foo:
|
||||
env:
|
||||
NO_NEW_TESTS: '{{.NO_NEW_TESTS}}'
|
||||
PARENT_BRANCH: '{{.PARENT_BRANCH}}'
|
||||
cmds:
|
||||
- echo $SHELL
|
||||
- echo {{.NO_NEW_TESTS}}
|
||||
- echo $NO_NEW_TESTS
|
||||
- ./contrib/check_new_tests.fish
|
||||
|
||||
lint:fix:delta:
|
||||
vars:
|
||||
FILES:
|
||||
|
5
contrib/check_changelog.fish
Executable file
5
contrib/check_changelog.fish
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
if test -z "$NO_CHANGELOG"
|
||||
git diff-ls main | grep .changeset/ ;
|
||||
end
|
5
contrib/check_new_tests.fish
Executable file
5
contrib/check_new_tests.fish
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
if test -z "$NO_NEW_TESTS"
|
||||
git diff-ls $PARENT_BRANCH | grep test
|
||||
end
|
Loading…
Reference in New Issue
Block a user