Skip to content

Commit acadbb1

Browse files
committed
feat(terra/autoupdate): weekly packages real
1 parent 44c72b8 commit acadbb1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pages/terra/autoupdate.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ You can obtain the branch name during runtime in Rhai using `labels.branch` (str
8181
Consequently, under normal circumstances and without approval, you are NOT allowed to use GitHub/GitLab related functions.
8282
</Callout>
8383

84+
#### Weekly packages
85+
86+
Weekly packages are updated every 7 days using
87+
`anda update -vv --filters weekly=$(date "+%w"){:ansi}`.
88+
Their `anda.hcl` files should look something like this:
89+
90+
```hcl
91+
project pkg {
92+
rpm {
93+
spec = "pkg.spec"
94+
}
95+
labels {
96+
weekly = 0 # a random number between 0~6 inclusive
97+
}
98+
}
99+
```
100+
101+
To decide the random number, just search for "_random number between 0 and 6_" with your favourite search engine.
102+
The random number decides which day in the week will the auto-update script run.
103+
84104
#### Functions and Modules
85105

86106
In most cases, `rpm.version(gh("..."));{:ts}` as a one-liner is enough to make it work™.

0 commit comments

Comments
 (0)