Skip to content

Commit

Permalink
release v0.9.7
Browse files Browse the repository at this point in the history
Changes:
- restore footer on LaTeXML 0.8.8 (fix #20)
- create releases using a GitHub Action
  • Loading branch information
xworld21 committed Oct 3, 2024
1 parent efff257 commit 1df42ee
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Create release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
name: Create release
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: make sassc zip
version: 1.0
- name: Compile release
env:
version: ${{ github.ref_name }}
date: ${{ github.event.head_commit.timestamp }}
run: make SASS=sassc BOOKML_VERSION="$version" BOOKML_DATE="$(date --date="$date" '+%Y/%m/%d')" release
- name: Upload release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
notes: ${{ github.event.head_commit.message }}
run: |
gh release create "$tag" --repo "$GITHUB_REPOSITORY" --title="$tag" --notes "$notes" --draft *.zip
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ BOOKML_OUT := $(BOOKML_CSS) $(BOOKML_XSLT) $(BOOKML_LTX) $(BOOKML_LTXML) $(BOO
RELEASE_OUT := $(patsubst %,bookml/%,$(GITBOOK_OUT)) $(BOOKML_OUT) bookml/GNUmakefile

BOOKML_VERSION = $(shell git log HEAD^..HEAD --format='%(describe)')
BOOKML_DATE = $(shell git log HEAD^..HEAD --format='%ad' --date='format:%Y/%m/%d')

.PHONY: all release clean test docker docker-amd64 docker-arm64 docker-texlive docker-texlive-amd64 docker-texlive-arm64
.PRECIOUS:
Expand Down Expand Up @@ -132,8 +133,7 @@ bookml/GNUmakefile: template/GNUmakefile | $(BOOKML_DIRS)
bookml/bookml.sty: bookml.sty | $(BOOKML_DIRS)

$(patsubst %,bookml/%,bookml.mk bookml.sty bookml.sty.ltxml XSLT/utils.xsl): bookml/%: % | $(BOOKML_DIRS)
$(eval _date:=$(shell git log HEAD^..HEAD --format='%ad' --date='format:%Y/%m/%d'))
perl -pe "s!\@DATE@!$(_date)!g; s!\@VERSION@!$(BOOKML_VERSION)!g" "$<" > "$@"
perl -pe "s!\@DATE@!$(BOOKML_DATE)!g; s!\@VERSION@!$(BOOKML_VERSION)!g" "$<" > "$@"

# fix erratic positioning of the prev/next buttons due to buggy rounding
gitbook/js/app.min.js: $(GITBOOK_SOURCE)/js/app.min.js | $(GITBOOK_DIRS)
Expand Down
4 changes: 2 additions & 2 deletions XSLT/gitbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@
<xsl:template match="/ltx:*" mode="end">
<xsl:choose>
<xsl:when test="$GITBOOK">
<xsl:if test="//ltx:navigation/ltx:inline-para[@class='ltx_page_footer']">
<xsl:if test="//ltx:navigation/ltx:inline-para[@class='ltx_page_footer'] | //ltx:navigation/ltx:inline-logical-block[@class='ltx_page_footer']">
<xsl:text>&#x0A;</xsl:text>
<footer class="bml_footer">
<xsl:apply-templates select="//ltx:navigation/ltx:inline-para[@class='ltx_page_footer']/*"/>
<xsl:apply-templates select="//ltx:navigation/ltx:inline-para[@class='ltx_page_footer']/* | //ltx:navigation/ltx:inline-logical-block[@class='ltx_page_footer']/*"/>
</footer>
</xsl:if>
</xsl:when>
Expand Down

0 comments on commit 1df42ee

Please sign in to comment.