forked from onwidget/astrowind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
142 lines (142 loc) · 4.14 KB
/
Taskfile.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Taskfile for Evan Harmon Website
version: '3'
tasks:
boostrap:
cmds:
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- brew install python #TODO: Might need to use a non-homebrew method
silent: true
install:
cmds:
- brew bundle --file=Brewfile
- python install -r requirements.txt
silent: true
validate:
cmds:
- task: preCommit
- task: check
silent: true
preCommit:
cmds:
- pre-commit run --all-files
silent: true
check:
cmds:
- npm run check:astro
- npm run check:eslint
- cmd: npm run check:prettier
# - shellcheck osConfig/mac/updateMac.sh
# - shellcheck osConfig/mac/setupMac.sh
# - shellcheck osConfig/mac/configureMacSettings.sh
ignore_error: true
silent: true
fix:
cmds:
- npm run fix
silent: true
security:
cmds:
- task: secrets
- task: sast
ignore_error: true
silent: true
secrets:
cmds:
- ./check_for_pattern.sh . "*secret*"
- whispers --config test/whisperConfig.yml --severity BLOCKER,CRITICAL .
silent: true
sast:
cmds:
- task: sast-dependencies
- task: sast-code
silent: true
sast-dependencies:
cmds:
- snyk test --all-projects
silent: true
sast-code:
cmds:
- snyk code test
silent: true
ghReleaseInit:
cmds:
- git add .
- git commit -m 'Initial release v0.0.1'
- git tag -a v0.0.1 -m "Initial release v0.0.1"
- git push origin main
- git push origin --tags
- gh release create
silent: false
vBumpPatch:
desc: Bump to the next patch version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
MINOR:
sh: echo "{{.VERSION}}" | cut -d. -f2
PATCH:
sh: echo "{{.VERSION}}" | cut -d. -f3
NEW_PATCH:
sh: expr {{.PATCH}} + 1
NEW_VERSION: v{{.MAJOR}}.{{.MINOR}}.{{.NEW_PATCH}}
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping patch version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}
- gh release create
vBumpMinor:
desc: Bump to the next minor version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
MINOR:
sh: echo "{{.VERSION}}" | cut -d. -f2
NEW_MINOR:
sh: expr {{.MINOR}} + 1
NEW_VERSION: v{{.MAJOR}}.{{.NEW_MINOR}}.0
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping minor version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}
- gh release create {{.NEW_VERSION}} --generate-notes
vBumpMajor:
desc: Bump to the next major version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
NEW_MAJOR:
sh: expr {{.MAJOR}} + 1
NEW_VERSION: v{{.NEW_MAJOR}}.0.0
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping major version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}
- gh release create
bunchAdd:
cmds:
- mv '.meta/Code Project - Evan Harmon Website.bunch' '/Users/evan/Library/Mobile Documents/com~apple~CloudDocs/Bunches/'
- ln -s '/Users/evan/Library/Mobile Documents/com~apple~CloudDocs/Bunches/Code Project - Evan Harmon Website.bunch' .meta
silent: false
obsidianAdd:
cmds:
- mv '.meta/Evan Harmon Website.md' '/Users/evan/Local/Memex/Personal/Digital'
- ln -s '/Users/evan/Local/Memex/Personal/Digital/Evan Harmon Website.md' .meta
silent: false