From 1ebf6d8fd30465795122f8493f76b9aa07662ea4 Mon Sep 17 00:00:00 2001 From: Cypress Reed Date: Fri, 18 Sep 2026 19:15:00 -0600 Subject: [PATCH 1/3] update docs for quaterdaily --- src/content/docs/contributing/autoupdate.mdx | 74 +++++++++++++++++++- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/src/content/docs/contributing/autoupdate.mdx b/src/content/docs/contributing/autoupdate.mdx index b297f3f2..3e2852cb 100644 --- a/src/content/docs/contributing/autoupdate.mdx +++ b/src/content/docs/contributing/autoupdate.mdx @@ -22,9 +22,8 @@ Updates are triggered every 10 minutes using Actually, the [full command](https://github.com/terrapkg/packages/blob/4767e5b9560f2986accaeb8447fbb4ea742041cf/.github/workflows/update.yml#L27-L31) - for auto-updating normal packages is: (as of 2024-08-09) ```sh - RUST_BACKTRACE=full GITHUB_TOKEN=... anda update -vv --excludes nightly=1 - --excludes updbranch=1 ``` + for auto-updating normal packages is: (as of 2024-08-09) ```sh RUST_BACKTRACE=full + GITHUB_TOKEN=... anda update -vv --excludes weekly=1 --excludes updbranch=1 --excludes nightly=1 --excludes nightly=2 --excludes nightly=3 --excludes nightly=4 --excludes quadridaily=1 ``` ## Common Update Scripts @@ -182,6 +181,75 @@ if rpm.changed() { // This if statement updates the "commit_date" if "ver" and/o } ``` +## Quaterdaily packages + +Quaterdaily packages are updated every 6 hours using + + +. Their `anda.hcl` files should look something like this (with the `quaterdaily = 1` label): + +```hcl +project pkg { + rpm { + spec = "package-name.spec" + } + labels { + quaterdaily = 1 + } +} +``` + +Now lets go over some common nightly `update.rhai` examples. + +### GitHub Commit Tracking + +This is the most commonly used update script. It tracks the versions of a package hosted on GitHub, pulling from its releases. + +```ts +rpm.global("commit", gh_commit("FyraLabs/subatomic")); // Grab the latest commit from GitHub, then update the globally defined RPM macro "commit" +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); // Update the globally defined "commit_date" to the date of the commit + rpm.global("run", quaterdaily_run()); // Set the run number based on the quarter of the day +} +``` + +Replace `FyraLabs/subatomic` with the GitHub link, minus the `https://github.com/`. + +### GitLab Commit Tracking + +This is the most commonly used update script. It tracks the versions of a package hosted on GitLab, pulling from its releases. + +```ts +rpm.global("commit", gitlab_commit("gitlab.com", "24306684", "main")); +if rpm.changed() { + rpm.global("commit_date", date()); + rpm.global("run", quaterdaily_run()); + rpm.release(); +} +``` + +Replace `gitlab.com` with a custom GitLab link (if there is one), replace `24306684` with the GitLab Project ID, and replace `main` with the branch to track. + +### Nightly Versions of a Stable Package update.rhai + +If you have a nightly version of a stable package, you will need to track commits and versions of the package. +To do this, you would use an `update.rhai` like this: + +```ts +rpm.global("ver", gh("FyraLabs/subatomic")); // Track latest release version of package, update the globally defined RPM macro "ver" +rpm.global("commit", gh_commit("FyraLabs/subatomic")); // Track latest commit of package, update the globally defined RPM macro "commit" +if rpm.changed() { // This if statement updates the "commit_date" and "run" if "ver" and/or "commit" changed, so the latest commit of a package is always the latest version that gets installed by a user + rpm.release(); + rpm.global("commit_date", date()); + rpm.global("run", quaterdaily_run()); +} +``` + ## Per-branch auto-update scripts Terra supports updating a package for specific branches instead of updating a package for all branches. From c0c5b662034406e93a005ee5b09ed42958710160 Mon Sep 17 00:00:00 2001 From: Cypress Reed Date: Sat, 10 Oct 2026 21:37:52 -0600 Subject: [PATCH 2/3] update some more stuff --- src/content/docs/contributing/autoupdate.mdx | 12 +++++++----- src/content/docs/contributing/getting-started.mdx | 3 ++- src/content/docs/contributing/policies.mdx | 10 +++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/content/docs/contributing/autoupdate.mdx b/src/content/docs/contributing/autoupdate.mdx index 3e2852cb..f8efce99 100644 --- a/src/content/docs/contributing/autoupdate.mdx +++ b/src/content/docs/contributing/autoupdate.mdx @@ -183,10 +183,12 @@ if rpm.changed() { // This if statement updates the "commit_date" if "ver" and/o ## Quaterdaily packages +Does anyone know what a quaterdaily is? I just wanted an update script for a goddamn package. + Quaterdaily packages are updated every 6 hours using @@ -203,11 +205,11 @@ project pkg { } ``` -Now lets go over some common nightly `update.rhai` examples. +Now, let's go over some common quaterdaily `update.rhai` examples. ### GitHub Commit Tracking -This is the most commonly used update script. It tracks the versions of a package hosted on GitHub, pulling from its releases. +This is the most commonly used GitHub update script. It tracks the commit of a package hosted on GitHub. ```ts rpm.global("commit", gh_commit("FyraLabs/subatomic")); // Grab the latest commit from GitHub, then update the globally defined RPM macro "commit" @@ -222,7 +224,7 @@ Replace `FyraLabs/subatomic` with the GitHub link, minus the `https://github.com ### GitLab Commit Tracking -This is the most commonly used update script. It tracks the versions of a package hosted on GitLab, pulling from its releases. +This is the most commonly used GitLab update script. It tracks the commit of a package hosted on GitLab. ```ts rpm.global("commit", gitlab_commit("gitlab.com", "24306684", "main")); @@ -241,10 +243,10 @@ If you have a nightly version of a stable package, you will need to track commit To do this, you would use an `update.rhai` like this: ```ts -rpm.global("ver", gh("FyraLabs/subatomic")); // Track latest release version of package, update the globally defined RPM macro "ver" rpm.global("commit", gh_commit("FyraLabs/subatomic")); // Track latest commit of package, update the globally defined RPM macro "commit" if rpm.changed() { // This if statement updates the "commit_date" and "run" if "ver" and/or "commit" changed, so the latest commit of a package is always the latest version that gets installed by a user rpm.release(); + rpm.global("ver", gh("FyraLabs/subatomic")); // Track latest release version of package, update the globally defined RPM macro "ver" rpm.global("commit_date", date()); rpm.global("run", quaterdaily_run()); } diff --git a/src/content/docs/contributing/getting-started.mdx b/src/content/docs/contributing/getting-started.mdx index d6a8df59..d8847b85 100644 --- a/src/content/docs/contributing/getting-started.mdx +++ b/src/content/docs/contributing/getting-started.mdx @@ -258,7 +258,8 @@ See the "book" (more like guide) for [Rhai]. - Create an `update.rhai` file inside the folder of your package alongside your `.spec` file. - See references from other packages. -- You also need to add in `anda.hcl` for nightly packages. +- You need to add in `anda.hcl` for nightly packages. +- You need to add in `anda.hcl` for quaterdaily packages. diff --git a/src/content/docs/contributing/policies.mdx b/src/content/docs/contributing/policies.mdx index ad4efb84..95c4b6ee 100644 --- a/src/content/docs/contributing/policies.mdx +++ b/src/content/docs/contributing/policies.mdx @@ -103,8 +103,12 @@ Packages SHOULD follow one of the version formats below: Version: %{latest_stable_version} ## (Commit tacking (nightly off version tag)) Version: %{latest_stable_version}^%{commit_date}git.%{shortcommit} -## (Commit tacking (no stable version tag)) +## (Commit tracking (nightly, no stable version tag)) Version: %{unreleased_version}~%{commit_date}git.%{shortcommit} +## (Commit tracking (quaterdaily off version tag)) +Version: %{latest_stable_version}^%{commit_date}^{quaterdaily_run}git.%{shortcommit} +## (Commit tracking (quaterdaily, no stable version tag)) +Version: %{unreleased_version}^%{commit_date}^{quaterdaily_run}git.%{shortcommit} ``` `git` SHOULD be replaced with the correct _VCS identifier_ for **(b)** and **(c)** as listed below. @@ -123,13 +127,13 @@ Version: %{unreleased_version}~%{commit_date}git.%{shortcommit} | Fossil | `fsl` | -If either commit tracking option is used, you MUST also include in `anda.hcl` unless there is no `update.rhai`, +If either commit tracking option is used, you MUST also include OR in `anda.hcl` unless there is no `update.rhai`, as these two formats rely on the assumption that there is one for each (and vice versa). refers to the expected version number for the next stable (or a more stable tag than ) release, while refers to the current latest released version number, preferably stable. -If there are stable releases but the package is build from a commit, you SHOULD append a commit to the version when there is a stable and nightly version of a package. +If there are stable releases but the package is build from a commit, you SHOULD append a commit to the version when there is a stable and nightly/quaterdaily version of a package. If upstream does not provide a version, use the commit to `0^` instead. From 1f9c080c2ca6c129b5be3203816979c51a3537a7 Mon Sep 17 00:00:00 2001 From: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Date: Mon, 19 Oct 2026 12:50:52 -0500 Subject: [PATCH 3/3] remove funny --- src/content/docs/contributing/autoupdate.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/content/docs/contributing/autoupdate.mdx b/src/content/docs/contributing/autoupdate.mdx index f8efce99..c0cc9a44 100644 --- a/src/content/docs/contributing/autoupdate.mdx +++ b/src/content/docs/contributing/autoupdate.mdx @@ -183,8 +183,6 @@ if rpm.changed() { // This if statement updates the "commit_date" if "ver" and/o ## Quaterdaily packages -Does anyone know what a quaterdaily is? I just wanted an update script for a goddamn package. - Quaterdaily packages are updated every 6 hours using