version: '3'
vars:
TMP: /tmp
TEST_DROP_SHA: f7f92c8df8c4d9cdbcb6d8e6c3f86f268492eff2
tasks:
default: task --list-all
build: cargo b
dev: bacon
test:init-empty:
deps: ["build"]
dir: '{{ .TMP }}/devenvious-test_empty'
cmds:
- rm -rf {.*,*.*}
- 'direnv deny 2>&1 >/dev/null || true' - cmd: 'echo; {{ .ROOT_DIR }}/target/debug/devenvious init {{ .CLI_ARGS }} && direnv allow'
ignore_error: true
- 'exec fish'
test:init-existing:
deps: ["build"]
dir: '{{ .TMP }}/devenvious-test_existing'
cmds:
- rm -rf {.*,*.*}
- rsync -a {{ .ROOT_DIR }}/test/_basic-base/ ./
- mv .test-git .git - 'direnv deny 2>&1 >/dev/null || true' - cmd: 'echo; {{ .ROOT_DIR }}/target/debug/devenvious init {{ .CLI_ARGS }}' ignore_error: true
- 'exec fish'
_test:setup_update:
deps: ["build"]
internal: true
dir: '{{ .TMP }}/devenvious-test_update'
cmds:
- rm -rf {.*,*.*}
- 'direnv deny 2>&1 >/dev/null || true' - '{{ .ROOT_DIR }}/target/debug/devenvious init {{ .INIT_ARGS }}'
test:update:
deps: ["_test:setup_update"]
dir: '{{ .TMP }}/devenvious-test_update'
cmds:
- task: _test:setup_update
vars:
INIT_ARGS: -b test-old
- cmd: 'echo; {{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }} && direnv allow'
ignore_error: true
- 'exec fish'
test:update-dirty:
deps: ["build"]
dir: '{{ .TMP }}/devenvious-test_update'
cmds:
- task: _test:setup_update
vars:
INIT_ARGS: -b test-old2 -s
- echo dirty > dirty-file.txt
- '{{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }}'
- 'exec fish'
test:update-squashed:
deps: ["_test:setup_update"]
dir: '{{ .TMP }}/devenvious-test_update'
cmds:
- task: _test:setup_update
vars:
INIT_ARGS: -b test-old2 -s
- cmd: '{{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }} && direnv allow'
ignore_error: true
- 'exec fish'
test:update-squashed-conflict:
deps: ["_test:setup_update"]
dir: '{{ .TMP }}/devenvious-test_update'
cmds:
- task: _test:setup_update
vars:
INIT_ARGS: -b test-old -s
- sd '2.3.0' '2.3.4' .envrc && git add .envrc && git commit -m 'patchversion envrc'
- cmd: 'echo; {{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }} && direnv allow'
ignore_error: true
- 'exec fish'