-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.dist.yml
75 lines (63 loc) · 2.29 KB
/
Taskfile.dist.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
version: "3"
set: [pipefail]
shopt: [globstar]
vars:
BOULDER_PROFILE: '{{ default "local-x86_64" (env "BOULDER_PROFILE") }}'
tasks:
build:
desc: Build a stone recipe
dir: "{{ .USER_WORKING_DIR }}"
deps: [profile-exists]
preconditions:
- sh: "test -f stone.yml"
msg: "Create a new stone.yml first to build it"
cmds:
- sudo boulder build ./stone.yml -p {{ .BOULDER_PROFILE }}
build-and-copy:
desc: Builds the stone recipe and then copies it to the local profile
cmds:
- task: build
- task: copy-profile
clean:
desc: Clean all .stones in the local directory
dir: "{{ .USER_WORKING_DIR }}"
cmds:
- rm -fv *.stone
clean-repo:
desc: Clean all .stones in this repository
cmds:
- rm -fv **/*.stone
- rm -fv *.stone
clean-profile:
desc: Cleans the local profile and reindexes it
cmds:
- sudo rm -fv /var/cache/boulder/repos/{{ .BOULDER_PROFILE }}/*.stone
- task: index-profile
clean-all:
desc: Cleans local profile and the repo
deps: [clean-repo, clean-profile]
copy-profile:
desc: Copies .stones in this folder to local profile and reindexes it
dir: "{{ .USER_WORKING_DIR }}"
preconditions:
- sh: pattern="*.stone"; files=( $pattern ); test -f "${files[0]}"
msg: "You must first build the package to copy artefacts to your profile"
cmds:
- sudo cp -v *.stone /var/cache/boulder/repos/{{ .BOULDER_PROFILE }}/
- task: index-profile
profile-exists:
internal: true
desc: Checks if a profile exists and if it has an index file. If not it creates it
status:
- test -f /var/cache/boulder/repos/{{ .BOULDER_PROFILE }}/stone.index
cmds:
- task: create-profile
create-profile:
desc: Creates local profile and the initial index
cmds:
- sudo mkdir -p /var/cache/boulder/repos/{{ .BOULDER_PROFILE }}/
- task: index-profile
index-profile:
desc: Re-creates moss index for local profile
cmds:
- sudo moss idx /var/cache/boulder/repos/{{ .BOULDER_PROFILE }}/