Compare commits

...

17 Commits

Author SHA1 Message Date
Sven Vogel ef5400ea43 chore: bump release version to v0.5.4
Create Release Commit / prepare (push) Has been skipped Details
Create Release / Check Template and Build example (push) Successful in 2m17s Details
Create Release / release (push) Successful in 54s Details
Generated-By: servostar
2024-11-25 16:03:55 +00:00
Sven Vogel bdbf641fd4 feat: make supervisor signature optional (#112)
Create Release Commit / prepare (push) Has been cancelled Details
Release-As: v0.5.4
Reviewed-on: #112
2024-11-25 16:03:42 +00:00
Sven Vogel 1d6a900fca docs: update build badge (#106)
Create Release Commit / prepare (push) Has been skipped Details
Reviewed-on: #106
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 15:21:02 +00:00
Sven Vogel 04efd8251e docs: add-contributing (#105)
Create Release Commit / prepare (push) Has been skipped Details
Reviewed-on: #105
2024-11-25 15:15:32 +00:00
Sven Vogel 081fea5a4c ci: add generated-by body to version bump commit (#103)
Create Release Commit / prepare (push) Has been skipped Details
Reviewed-on: #103
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 15:12:34 +00:00
Sven Vogel 564a3f7b95 chore: bump release version to v0.5.3
Create Release / Check Template and Build example (push) Successful in 2m17s Details
Create Release / release (push) Successful in 53s Details
Build'n check / run-ci-linux (pull_request) Has been skipped Details
2024-11-25 14:50:52 +00:00
Sven Vogel 4e51d4f70e ci: use-checkout-for-pushs (#102)
Create Release Commit / prepare (push) Successful in 14s Details
Release-As: v0.5.3
Reviewed-on: #102
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 14:50:39 +00:00
Sven Vogel 6b8ecbfc8a ci: add origin remote (#101)
Create Release Commit / prepare (push) Failing after 36s Details
Release-As: v0.5.3
Reviewed-on: #101
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 14:30:27 +00:00
Sven Vogel cc855667cc ci: fix-git-commands (#100)
Create Release Commit / prepare (push) Failing after 35s Details
Release-As: v0.5.3
Reviewed-on: #100
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 13:56:06 +00:00
Sven Vogel 728e451e66 ci: add prepare action and run release on pushed tag (#99)
Create Release Commit / prepare (push) Failing after 37s Details
Create Release / Check Template and Build example (push) Successful in 2m21s Details
Create Release / release (push) Failing after 52s Details
Release-As: v0.5.3
Reviewed-on: #99
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 13:35:37 +00:00
Sven Vogel 3512cc66cc ci: add user identity to release (#98)
Build'n check / Check Template and Build example (push) Successful in 2m21s Details
Build'n check / release (push) Failing after 55s Details
Release-As: v0.5.3
Reviewed-on: #98
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 12:39:31 +00:00
Sven Vogel 2e02619fdb ci/version-as-env (#97)
Build'n check / Check Template and Build example (push) Successful in 2m57s Details
Build'n check / release (push) Failing after 40s Details
Release-As: v0.5.3
Reviewed-on: #97
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 12:17:58 +00:00
Sven Vogel f1df70aa96 ci: fully qualify gitea release action (#96)
Build'n check / Check Template and Build example (push) Successful in 2m48s Details
Build'n check / release (push) Failing after 40s Details
Release-As: v0.5.3
Reviewed-on: #96
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 11:55:29 +00:00
Sven Vogel 70f2bde4d1 ci: fix-syntax (#95)
Build'n check / Check Template and Build example (push) Successful in 2m45s Details
Build'n check / release (push) Failing after 5s Details
Release-As: v0.5.3
Reviewed-on: #95
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 11:44:40 +00:00
Sven Vogel 44d995fd28 ci: run release on push (#94)
Build'n check / Check Template and Build example (push) Successful in 2m29s Details
Build'n check / release (push) Failing after 54s Details
Release-As: v0.5.3
Reviewed-on: #94
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 10:18:05 +00:00
Sven Vogel b0fc412b57 ci/fix-release-artifacts (#93)
Release-As: v0.5.3
Reviewed-on: #93
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 10:01:24 +00:00
Sven Vogel 4bb731ca66 ci: test release action (#90)
Build'n check / run-ci-linux (push) Has been skipped Details
Release-As: v0.5.3
Reviewed-on: #90
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
2024-11-25 09:20:41 +00:00
11 changed files with 210 additions and 70 deletions

View File

@ -1,10 +1,13 @@
name: Build'n check name: Build'n check
run-name: Performing Typst compilation run-name: Performing Typst compilation
on: on:
push:
pull_request: pull_request:
branches: branches:
- main
push:
branches-ignore:
- main - main
jobs: jobs:
run-ci-linux: run-ci-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -0,0 +1,38 @@
name: Create Release Commit
on:
push:
branches:
- main
tags-ignore:
- v*.*.*
jobs:
prepare:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'Release-As:')
env:
USERNAME: servostar
EMAIL: sven.vogel123@web.de
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: 'main'
token: ${{ secrets.RELEASE_TOKEN }}
- name: Tag Release Commit
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
git config --global user.name "${USERNAME}"
git config --global user.email "${EMAIL}"
echo "==> Update typst.toml version"
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
git add typst.toml
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
git push origin main
echo "::endgroup::"
echo "::group::{Tag commit}"
git tag -m "Release" "${VERSION}"
git push origin "${VERSION}"
echo "::endgroup::"

View File

@ -0,0 +1,65 @@
name: Create Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
name: Check Template and Build example
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies for Nix setup action
run: |
apt update -y
apt install sudo -y
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Stylecheck
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
- id: build
name: Build
run: |
nix-shell --run ./run-ci.sh
- name: Upload artifact
id: artifact-upload
uses: actions/upload-artifact@v3
with:
name: example-document
path: ${{ github.workspace }}/example.pdf
if-no-files-found: error
retention-days: 1
- name: Output artifact ID
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Download Artifact
id: download
uses: actions/download-artifact@v3
with:
name: example-document
path: ${{ github.workspace }}/Example.pdf
- name: 'Artifact Download Path'
run: echo ${{ steps.download.outputs.download-path }}
- name: Prepare Release
run: echo ${{ github.sha }} > Release.txt
- name: Create release
id: create-release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
Example.pdf
Release.txt
LICENSE
api_key: '${{secrets.RELEASE_TOKEN}}'

17
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,17 @@
# Contributing
Development of this template happens at
[git.montehaselino.de](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
For this reason pull request opened at any mirror such as on GitHub, will not be
merged as this would compromise the push mirror.
Pull requests shall be opened exclusively in the official
[repository](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
Issues may be created at GitHub or the official repository.
Beware, that linked pull requests and issues in commits messages refer to those
in the official instance and may be broken or invalid on mirrors such as GitHub.
Direct pushes to the `main` branch are discouraged. In order to make a change
create a new pull request and wait for a maintainer to merge it. Note that in
order to be able to merge, the continuous integration pipeline must run
successfully.

View File

@ -2,7 +2,7 @@
<div align="center"> <div align="center">
<h1>DHBW-ABB template for Typst</h1> <h1>DHBW-ABB template for Typst</h1>
<img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de"> <img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
<img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/ci.yml?label=build"> <img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/release.yml?label=build">
<img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release"> <img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release">
<img src="https://img.shields.io/badge/license-MIT-ff0000"> <img src="https://img.shields.io/badge/license-MIT-ff0000">
<img src="https://img.shields.io/badge/Typst-2B9CB0"> <img src="https://img.shields.io/badge/Typst-2B9CB0">

View File

@ -9,5 +9,6 @@ pkgs.mkShellNoCC {
python312Packages.pyyaml python312Packages.pyyaml
typst typst
typstyle typstyle
ripgrep
]; ];
} }

View File

@ -24,6 +24,7 @@
name: "dualen Hochschule Baden-Württemberg", name: "dualen Hochschule Baden-Württemberg",
campus: "Eppelheim" campus: "Eppelheim"
), ),
supervisor-signature: false,
authors: ( authors: (
( (
name: "Sven Vogel", name: "Sven Vogel",

View File

@ -200,46 +200,49 @@ SOFTWARE.*/
#block( #block(
below: 1.5em, below: 1.5em,
width: 100%, width: 100%,
par(hanging-indent: 1em, align(left)[ par(
#text(weight: "bold", entry.short) hanging-indent: 1em,
#if hasLong and hasDesc [ align(left)[
(#text(entry.long)) #text(weight: "bold", entry.short)
] else if hasLong { #if hasLong and hasDesc [
text(entry.long) (#text(entry.long))
} ] else if hasLong {
#if hasDesc [ #sym.dash.en ] text(entry.long)
#if hasDesc [ #desc ] }
#if disable-back-references != true { #if hasDesc [ #sym.dash.en ]
term_references #if hasDesc [ #desc ]
.map(x => x.location()) #if disable-back-references != true {
.sorted(key: x => x.page()) term_references
.fold( .map(x => x.location())
(values: (), pages: ()), .sorted(key: x => x.page())
((values, pages), x) => if pages.contains( .fold(
x.page(), (values: (), pages: ()),
) { ((values, pages), x) => if pages.contains(
(values: values, pages: pages) x.page(),
} else { ) {
values.push(x) (values: values, pages: pages)
pages.push(x.page()) } else {
(values: values, pages: pages) values.push(x)
}, pages.push(x.page())
) (values: values, pages: pages)
.values },
.map(x => { )
let page-numbering = x.page-numbering() .values
if page-numbering == none { .map(x => {
page-numbering = "1" 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, .join(", ")
..counter(page).at(x), }
)] ],
} ),
)
.join(", ")
}
]),
) )
] ]
} }

View File

@ -122,17 +122,27 @@
#metadata("content terminate") <end-of-content> #metadata("content terminate") <end-of-content>
#end_styled(config)[ #end_styled(
// add bibliography if set config,
#if "bibliography" in config.thesis and config.thesis.bibliography != none { context [
pagebreak(weak: true) // add bibliography if set
counter(page).update(1) #if "bibliography" in config.thesis and config.thesis.bibliography != none {
set bibliography(style: "ieee") pagebreak(weak: true)
config.thesis.bibliography counter(page).update(1)
} set bibliography(
style: "ieee",
title: if (text.lang == "de") {
"Literaturverzeichnis"
} else if text.lang == "en" {
"Bibliography"
},
)
config.thesis.bibliography
}
// appendix // appendix
#show-appendix(config: config) #show-appendix(config: config)
] ],
)
] ]
] ]

View File

@ -147,22 +147,24 @@
#context panic("no translation for language: ", text.lang) #context panic("no translation for language: ", text.lang)
] ]
#align( #if config.supervisor-signature {
bottom, align(
grid( bottom,
// set width of columns grid(
// we need two, so make both half the page width // set width of columns
columns: (60%, 40%), // we need two, so make both half the page width
align(left, if text.lang == "de" [ columns: (60%, 40%),
Unterschrift des betrieblichen Betreuers align(left, if text.lang == "de" [
] else if text.lang == "en" [ Unterschrift des betrieblichen Betreuers
Signature of the company supervisor ] else if text.lang == "en" [
] else [ Signature of the company supervisor
#context panic("no translation for language: ", text.lang) ] else [
] #context panic("no translation for language: ", text.lang)
), ]
align(right, {line(length: 6cm)})), ),
) align(right, {line(length: 6cm)})),
)
}
#counter(page).update(0) #counter(page).update(0)
] ]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "dhbw-abb-typst-template" name = "dhbw-abb-typst-template"
version = "0.4.1" version = "0.5.4"
entrypoint = "src/template.typ" entrypoint = "src/template.typ"
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"] authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
license = "MIT" license = "MIT"