-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.git-wt.yaml.example
More file actions
66 lines (55 loc) · 1.62 KB
/
.git-wt.yaml.example
File metadata and controls
66 lines (55 loc) · 1.62 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Example git-wt configuration file
# Copy this to .git-wt.yaml in your repository root and customize
new:
# Node.js project example
- name: npm-install
description: Install npm dependencies
script: npm install
# Copy environment file
- name: copy-env
description: Copy environment configuration
script: |
if [ -f $GIT_ROOT/.env ]; then
cp $GIT_ROOT/.env $WORKTREE_PATH/.env
echo "Environment file copied"
fi
# Database setup
- name: db-migrate
description: Run database migrations
script: npm run db:migrate
# Python project example
# - name: pip-install
# description: Install Python dependencies
# script: pip install -r requirements.txt
# Go project example
# - name: go-deps
# description: Download Go dependencies
# script: go mod download
# Ruby project example
# - name: bundle-install
# description: Install Ruby gems
# script: bundle install
# Custom build step
# - name: build
# description: Build the project
# script: npm run build
remove:
# Clean up build artifacts
- name: clean-build
description: Remove build artifacts
script: rm -rf dist/ build/
# Clean up cache
- name: clean-cache
description: Remove cache files
script: |
rm -rf node_modules/.cache
rm -rf .cache
# Database cleanup (optional)
# - name: db-cleanup
# description: Clean up test data
# script: npm run db:clean
# Environment variables available in scripts:
# - GIT_ROOT: Repository root path
# - WORKTREE_PATH: Full path to the worktree
# - WORKTREE_NAME: Branch name
# - BASE_BRANCH: Parent branch