forked from hiero-ledger/hiero-sdk-tck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
60 lines (53 loc) · 2.32 KB
/
Taskfile.yaml
File metadata and controls
60 lines (53 loc) · 2.32 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
version: "3"
tasks:
cleanup-generated-mirror-node-models:
desc: Cleans up generated OpenAPI files and reorganizes the structure
cmds:
# Remove core and services directories
- rm -rf src/utils/models/mirror-node-models/core
- rm -rf src/utils/models/mirror-node-models/services
# Move all files from models directory to mirror-node-models
- mv src/utils/models/mirror-node-models/models/* src/utils/models/mirror-node-models/
# Remove the now-empty models directory
- rm -rf src/utils/models/mirror-node-models/models
# Update index.ts using Node.js
- node -e "
const fs = require('fs');
const path = 'src/utils/models/mirror-node-models/index.ts';
let content = fs.readFileSync(path, 'utf8');
content = content.split('\n')
.filter(line => !line.includes('/core/') && !line.includes('/services/'))
.map(line => line.replace('./models/', './'))
.join('\n');
fs.writeFileSync(path, content);
"
status:
- test ! -d src/utils/models/mirror-node-models
generate-mirror-node-models:
desc: Generates OpenAPI models and cleans up the structure
cmds:
- npm run generate-mirror-node-models
- task: cleanup-generated-mirror-node-models
tag-previous-version:
desc: Tags the current 'latest' Docker image with a specific version number
silent: true
vars:
VERSION: "{{.VERSION}}"
cmds:
- echo "Pulling latest Docker image from DockerHub"
- docker pull ivaylogarnev/hiero-tck-client:latest
- echo "Tagging latest image as version {{.VERSION}}"
- docker tag ivaylogarnev/hiero-tck-client:latest ivaylogarnev/hiero-tck-client:{{.VERSION}}
- echo "Pushing tagged image to DockerHub"
- docker push ivaylogarnev/hiero-tck-client:{{.VERSION}}
preconditions:
- sh: test -n "{{.VERSION}}"
msg: "VERSION parameter is required. Usage: task tag-previous-version VERSION=x.y.z"
release-hiero-tck-client:
desc: Builds and pushes a new Docker image with the 'latest' tag to DockerHub
silent: true
cmds:
- echo "Building Docker image hiero-tck-client:latest"
- docker build -t ivaylogarnev/hiero-tck-client:latest -f Dockerfile .
- echo "Pushing Docker image to DockerHub"
- docker push ivaylogarnev/hiero-tck-client:latest