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 >/dev/null 2>&1 || true' # to not enable direnv it if the following fails: - 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 # https://stackoverflow.com/a/57393586 - 'direnv deny >/dev/null 2>&1 || true' # to not enable direnv it if the following fails: - cmd: 'echo; {{ .ROOT_DIR }}/target/debug/devenvious init {{ .CLI_ARGS }}' # && direnv allow' ignore_error: true - 'exec fish' _test:setup_update: deps: ["build"] internal: true dir: '{{ .TMP }}/devenvious-test_update' cmds: - rm -rf {.*,*.*} - 'direnv deny >/dev/null 2>&1 || true' # to not enable direnv it if the folgalowing fails: - '{{ .ROOT_DIR }}/target/debug/devenvious init {{ .INIT_ARGS }}' # - nix develop --impure -c echo && git add flake.lock && git commit -m 'flake.lock' # - git log #| head -30 - cmd: echo '--------------------------------------' silent: true test:update: dir: '{{ .TMP }}/devenvious-test_update' cmds: - task: _test:setup_update vars: INIT_ARGS: -b test-old2 - 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 # - sd '24.05' '23.11' flake.nix - '{{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }}' - 'exec fish' test:update-squashed: dir: '{{ .TMP }}/devenvious-test_update' cmds: - task: _test:setup_update vars: INIT_ARGS: -b test-old2 -s - git dog - cmd: '{{ .ROOT_DIR }}/target/debug/devenvious update {{ .CLI_ARGS }} && direnv allow' ignore_error: true - git dog - 'exec fish' test:update-squashed-conflict: dir: '{{ .TMP }}/devenvious-test_update' cmds: - task: _test:setup_update vars: INIT_ARGS: -b test-old2 -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'