From fd57f3973169a08d557ed2dd9094bb330afe0958 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:31:30 +0100 Subject: [PATCH 1/5] ci: add ripgrep to nix shell (cherry picked from commit c961dacf967a7831a8b44df1fe93b5b9bd7fa41e) --- shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.nix b/shell.nix index e3ea31b..12fabe3 100644 --- a/shell.nix +++ b/shell.nix @@ -9,5 +9,6 @@ pkgs.mkShellNoCC { python312Packages.pyyaml typst typstyle + ripgrep ]; } -- 2.40.1 From d6dcb8cc49baea880a721201b7e6f255d1a8ef83 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:31:47 +0100 Subject: [PATCH 2/5] style: run formatter (cherry picked from commit 84af717ce718506074b4668649025cfb973b8be7) --- src/glossarium.typ | 81 ++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/src/glossarium.typ b/src/glossarium.typ index 2da8c9d..9db2172 100644 --- a/src/glossarium.typ +++ b/src/glossarium.typ @@ -200,46 +200,49 @@ SOFTWARE.*/ #block( below: 1.5em, width: 100%, - par(hanging-indent: 1em, align(left)[ - #text(weight: "bold", entry.short) - #if hasLong and hasDesc [ - (#text(entry.long)) - ] else if hasLong { - text(entry.long) - } - #if hasDesc [ #sym.dash.en ] - #if hasDesc [ #desc ] - #if disable-back-references != true { - term_references - .map(x => x.location()) - .sorted(key: x => x.page()) - .fold( - (values: (), pages: ()), - ((values, pages), x) => if pages.contains( - x.page(), - ) { - (values: values, pages: pages) - } else { - values.push(x) - pages.push(x.page()) - (values: values, pages: pages) - }, - ) - .values - .map(x => { - let page-numbering = x.page-numbering() - if page-numbering == none { - page-numbering = "1" + par( + hanging-indent: 1em, + align(left)[ + #text(weight: "bold", entry.short) + #if hasLong and hasDesc [ + (#text(entry.long)) + ] else if hasLong { + text(entry.long) + } + #if hasDesc [ #sym.dash.en ] + #if hasDesc [ #desc ] + #if disable-back-references != true { + term_references + .map(x => x.location()) + .sorted(key: x => x.page()) + .fold( + (values: (), pages: ()), + ((values, pages), x) => if pages.contains( + x.page(), + ) { + (values: values, pages: pages) + } else { + values.push(x) + pages.push(x.page()) + (values: values, pages: pages) + }, + ) + .values + .map(x => { + let page-numbering = x.page-numbering() + if page-numbering == none { + page-numbering = "1" + } + link(x)[#numbering( + page-numbering, + ..counter(page).at(x), + )] } - link(x)[#numbering( - page-numbering, - ..counter(page).at(x), - )] - } - ) - .join(", ") - } - ]), + ) + .join(", ") + } + ], + ), ) ] } -- 2.40.1 From 1031085222531f0d801d2c1e02b256ffec20e92f Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:33:12 +0100 Subject: [PATCH 3/5] ci: remove run condition for CI on push on main (cherry picked from commit cc4d2175473cdfde1653063f24f8f326597f12c8) --- .gitea/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index bc4eec0..7211b71 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,9 +2,6 @@ name: Build'n check run-name: Performing Typst compilation on: push: - pull_request: - branches: - - main jobs: run-ci-linux: runs-on: ubuntu-latest @@ -12,8 +9,7 @@ jobs: # push with commit containing "Run-Checks" if: > (contains(github.event.head_commit.message, 'Run-Checks') && - github.event_name == 'push') || - github.event_name == 'pull_request' + github.event_name == 'push') steps: - name: Check out repository code uses: actions/checkout@v3 -- 2.40.1 From 23dd278e8dee37aae6aff5869cda8094f1f90ba3 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:27:46 +0100 Subject: [PATCH 4/5] ci: revert artifact up- and download action to v3 (cherry picked from commit c819704b49a96fc3db693fbb2d1688ec156702e8) --- .gitea/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 259d3b1..18156b2 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -28,7 +28,7 @@ jobs: nix-shell --run ./run-ci.sh - name: Upload artifact id: artifact-upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: example-document path: ${{ github.workspace }}/example.pdf @@ -51,7 +51,7 @@ jobs: go-version: '>=1.20.1' - name: Download Artifact id: download - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: example-document path: ${{ github.workspace }}/Example.pdf -- 2.40.1 From e2a9bd0fd679eb7b6f83aaffdbd59d05ff3ba524 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 10:46:12 +0100 Subject: [PATCH 5/5] ci: run checks when creating and synchronizing PRs --- .gitea/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7211b71..3a04e93 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,7 +1,12 @@ name: Build'n check run-name: Performing Typst compilation on: - push: + pull_request: + types: + - opened + - synchronize + branches: + - main jobs: run-ci-linux: runs-on: ubuntu-latest -- 2.40.1