chore: allow passing commit hash through inputs
This commit is contained in:
@@ -37,6 +37,7 @@ jobs:
|
||||
typst compile \
|
||||
--root . \
|
||||
--font-path ~/.fontist/fonts \
|
||||
--input hash=${{ gitea.sha }} \
|
||||
docs/manual.typ \
|
||||
docs/manual.pdf
|
||||
|
||||
|
||||
1459
docs/manual.pdf
1459
docs/manual.pdf
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,17 @@
|
||||
#import "@preview/gentle-clues:1.3.1" as gc
|
||||
|
||||
#let midas-version = toml("../pyproject.toml").project.version
|
||||
#let head-ref = read("../.git/HEAD").split(":").at(1).trim()
|
||||
#let commit-hash = read("../.git/" + head-ref).slice(0, 8)
|
||||
|
||||
#let commit-hash = if "hash" in sys.inputs {
|
||||
sys.inputs.hash.slice(0, 8)
|
||||
} else {
|
||||
let head-ref = read("../.git/HEAD").split(":").at(1, default: "").trim()
|
||||
if head-ref.len() != 0 {
|
||||
read("../.git/" + head-ref).slice(0, 8)
|
||||
} else {
|
||||
none
|
||||
}
|
||||
}
|
||||
|
||||
#show: project.with(
|
||||
title: [Midas User Manual],
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
title: none,
|
||||
author: none,
|
||||
version: "0.0.1",
|
||||
hash: "abcdefgh",
|
||||
hash: none,
|
||||
icon-path: none,
|
||||
doc,
|
||||
) = {
|
||||
@@ -69,13 +69,17 @@
|
||||
set raw(syntaxes: path("midas.sublime-syntax"))
|
||||
|
||||
let front-page() = {
|
||||
let version-name = [v#version]
|
||||
if hash != none {
|
||||
version-name = [#version-name - #hash]
|
||||
}
|
||||
align(center)[
|
||||
#{
|
||||
set text(size: 1.5em)
|
||||
std.title()
|
||||
}
|
||||
|
||||
v#version - #hash
|
||||
#version-name
|
||||
|
||||
#if icon-path != none {
|
||||
v(1cm)
|
||||
|
||||
Reference in New Issue
Block a user