-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yaml
44 lines (37 loc) · 1.08 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
# Binaries
PYTHON_BIN: python3
HUGO_BIN: hugo
# Directories
CONTENT_DIR: "{{.ROOT_DIR}}/content"
POSTS_DIR: "{{.CONTENT_DIR}}/posts"
includes:
hugo: .taskfiles/hugo/taskfile.yaml
jupyter: .taskfiles/jupyter/taskfile.yaml
dotenv: [".env"]
# env:
# ENVVAR: ''
tasks:
default: task -l
catchup:
desc: Catch feature branch up to main
interactive: true
cmds:
- cmd: git stash # save any work-in-progress
- defer: git stash pop # restore work-in-progress
- cmd: git fetch origin main # update remote
- task: _rebase
- cmd: echo "git rebase successful"
# - cmd: git push --force-with-lease
- cmd: echo "Caught up with main! To complete, use '\033[0;36mgit push --force-with-lease\033[0m'"
_rebase:
desc: Git rebase on main
interactive: true
# internal: true
cmd: |
git rebase origin/main --rebase-merges \
|| (echo "Merge conflicts detected, exiting task. Use 'git rebase --continue'." \
&& exit 1)