-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
27 lines (23 loc) · 976 Bytes
/
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
version: '3'
dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']
tasks:
generate:
desc: generate database and handlers code
cmds:
- |
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i "$OPENAPI_SPEC" \
--additional-properties packageName=emaildetective \
-g go \
-o /local
- rm git_push.sh
- go get github.com/stretchr/testify/assert
- grep -rl "GIT_USER_ID" | grep -v "Taskfile.yaml" | xargs sed -i.bak 's/GIT_USER_ID/AndrewCopeland/g'
- grep -rl "GIT_REPO_ID" | grep -v "Taskfile.yaml" | xargs sed -i.bak 's/GIT_REPO_ID/go-emaildetective/g'
- grep -rl "openapiclient" | grep -v "Taskfile.yaml" | xargs sed -i.bak 's/openapiclient/emaildetective/g'
- find . -type f -name "*.bak" -not -path "*/.git/*" -exec rm {} +
push:
desc: push a new version
cmds:
- git tag -a $TAG -m "Version $TAG"
- git push origin --tags