-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathTaskfile.dev.yml
More file actions
107 lines (86 loc) · 2.71 KB
/
Copy pathTaskfile.dev.yml
File metadata and controls
107 lines (86 loc) · 2.71 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
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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
# Copyright (c) BARGHEST
# SPDX-License-Identifier: AGPL-3.0-or-later
version: '3'
dotenv:
- .env
silent: true
tasks:
promptConfirmDotEnv:
prompt: Does the above configuration look correct?
deps:
- printDotEnv
#################################
# Development tasks
#################################
tidy:
desc: Run go mod tidy
cmds:
- go mod tidy
docs:
desc: Build documentation
cmd: mkdocs build
serveDocs:
desc: Serve documentation
cmd: mkdocs serve
buildAnalyst:
desc: Build MESH analyst client for local development
cmd: ./analyst/src/build.sh
deps:
- submoduleInit
buildAndroid:
desc: Build MESH Android client
cmds:
- make -C android-client apk
buildAndroidRelease:
desc: Build MESH Android client for release
cmds:
- make -C android-client release-apk
buildAndroidSigned:
desc: Build signed MESH Android client for release
cmds:
- make -C android-client release-apk-signed
clean:
desc: Clean up build artifacts
cmds:
- rm -f analyst/mesh analyst/tailscale analyst/tailscaled
- make -C android-client clean
tagRelease:
desc: >-
Prepare a release: bump versionCode/versionName, update fdroid metadata,
tag the main repo and tailscale submodule. Does NOT push — prints push
commands on success. Usage: task tagRelease VERSION=0.1.6-alpha
requires:
vars:
- VERSION
cmds:
- ./scripts/tag-release.sh "{{.VERSION}}"
fdroidInit:
desc: Initialize F-Droid repository for building Android client
vars:
GRADLE_PATH:
sh: which gradle
cmds:
- mkdir -p fdroid/metadata fdroid/build
- cp android-client/fdroid/com.barghest.mesh.yml fdroid/metadata/
- 'sed -i "s/commit:.*/commit: $(git rev-parse HEAD)/" fdroid/metadata/com.barghest.mesh.yml'
- ls fdroid/config.yml &>/dev/null || (cd fdroid && fdroid init)
- 'grep -q gradle fdroid/config.yml || echo "gradle: {{.GRADLE_PATH}}" >> fdroid/config.yml'
- ls fdroid/build/com.barghest.mesh &>/dev/null || git clone https://github.com/BARGHEST-ngo/MESH fdroid/build/com.barghest.mesh
fdroidBuild:
desc: Build MESH Android client for F-Droid
cmds:
- cd fdroid && fdroid build -v -l com.barghest.mesh
pinGithubActions:
desc: Pin GitHub Actions to a hash
cmds:
- go tool github.com/stacklok/frizbee actions .github/workflows
#################################
# Internal tasks
#################################
printDotEnv:
internal: true
cmd: echo ""; cat .env; echo ""
submoduleInit:
internal: true
cmd: git submodule update --init --recursive