Skip to content

Commit

Permalink
Merge branch 'sile-typesetter:master' into hbox-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmadzaid committed Jul 17, 2023
2 parents 9914673 + 83d1423 commit a733141
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 45 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build
on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -28,9 +28,6 @@ jobs:
path: |
lua_modules
key: luarocks-${{ hashFiles('Makefile-luarocks', 'sile.rockspec.in') }}
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Install system dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -58,7 +55,7 @@ jobs:
path: sile-${{ env.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
if: github.repository == 'sile-typesetter/sile' && startsWith(github.ref, 'refs/tags/v')
with:
body_path: sile-${{ env.VERSION }}.md
files: |
Expand All @@ -80,14 +77,10 @@ jobs:
.fonts
.sources
key: fonts-${{ hashFiles('Makefile-fonts') }}
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
uses: DeterminateSystems/nix-installer-action@v4
- name: Cache Nix dependencies
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Setup developer environment
run: |
nix develop --command ./bootstrap.sh
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Coverage
on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Coverage slows down tests *a lot*.
Expand Down Expand Up @@ -32,9 +32,6 @@ jobs:
path: |
lua_modules
key: luarocks-luajit-${{ hashFiles('Makefile-luarocks', 'sile.rockspec.in') }}
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v10
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Configure
run: |
echo "REF=${GITHUB_REF##refs/*/}" >> $GITHUB_ENV
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Flake
on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -15,14 +15,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
uses: DeterminateSystems/nix-installer-action@v4
- name: Cache Nix dependencies
uses: DeterminateSystems/magic-nix-cache-action@v2
# Upstream package sometimes has flags set that disable flake checking
- name: Setup test env
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test
on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -39,9 +39,6 @@ jobs:
path: |
lua_modules
key: luarocks-${{ matrix.luaVersion[0] }}-${{ hashFiles('Makefile-luarocks', 'sile.rockspec.in') }}
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v10
with:
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.14.10](https://github.com/sile-typesetter/sile/compare/v0.14.9...v0.14.10) (2023-07-11)


### Features

* **cli:** Allow more than one input document ([d20cbd8](https://github.com/sile-typesetter/sile/commit/d20cbd8a0b7a197ca87ca1dd1a39640fa746e301))
* **i18n:** Add localized strings for Cantonese and Chinese ([cb67d36](https://github.com/sile-typesetter/sile/commit/cb67d3686117258adaca546298063d23c66135f9))
* **packages:** Add document class styling in autodoc ([e70fa50](https://github.com/sile-typesetter/sile/commit/e70fa509673c32977a1e1f0545373229198c8aa8))
* **packages:** Provide API for registering raw handlers linked to packages ([45cd3ac](https://github.com/sile-typesetter/sile/commit/45cd3ac96acbe3f2dd572ce0c3c72c7599090e6b))


### Bug Fixes

* **build:** Avoid build artifacts being listed for installation ([29c2ccd](https://github.com/sile-typesetter/sile/commit/29c2ccd227774caa4accb90bb0d23825aafccfd1))
* **core:** Avoid stack overflow in Harfbuzz module ([#1793](https://github.com/sile-typesetter/sile/issues/1793)) ([5001efe](https://github.com/sile-typesetter/sile/commit/5001efe0cfeb421ce5796f8303bf046bb68c8326))
* **outputters:** Setup --makedeps to play along without explicit --output ([6ff2e16](https://github.com/sile-typesetter/sile/commit/6ff2e16f24224bc2781edc38be8cb9e1418fb30e))
* **packages:** Converters package no longer worked after 0.13.0 ([433795c](https://github.com/sile-typesetter/sile/commit/433795c3979688469a098a9966a595a4b0d34818))
* **packages:** Correct chord line height and chord font use ([65961c6](https://github.com/sile-typesetter/sile/commit/65961c6629244817220bac8a6f386a9a738b7f0b)), closes [#1351](https://github.com/sile-typesetter/sile/issues/1351)

## [0.14.9](https://github.com/sile-typesetter/sile/compare/v0.14.8...v0.14.9) (2023-04-11)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ A VCS package is also available as [sile-git][aur-sile-git] to build from the la
#### Fedora

A [COPR][copr] repository is available for Fedora users with packages of SILE
and all the necessary dependencies including fonts.
Fedora 36 and Fedora 37 are supported.
and all the necessary dependencies.
Fedora 38 and later are supported.
There is work in progress to get the packages added to the official Fedora repository.

```console
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
default: ""
runs:
using: docker
image: docker://ghcr.io/sile-typesetter/sile:v0.14.9
image: docker://ghcr.io/sile-typesetter/sile:v0.14.10
entrypoint: sh
args:
- -c
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sile",
"version": "0.14.9",
"version": "0.14.10",
"description": "The SILE Typesetter",
"main": "sile",
"scripts": {
Expand All @@ -19,14 +19,14 @@
},
"homepage": "https://sile-typesetter.org",
"devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@commitlint/prompt": "^17.5.0",
"commitizen": "^4.3.0",
"conventional-changelog-cli": "^2.2.2",
"husky": "^8.0.3",
"standard-version": "^9.5.0",
"yaml": "^2.2.1"
"@commitlint/cli": "^17.6",
"@commitlint/config-conventional": "^17.6",
"@commitlint/prompt": "^17.6",
"commitizen": "^4.3",
"conventional-changelog-cli": "^3.0",
"husky": "^8.0",
"standard-version": "^9.5",
"yaml": "^2.3"
},
"config": {
"commitizen": {
Expand Down
9 changes: 7 additions & 2 deletions spec/utilities_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ describe("SILE.utilities", function()

describe("formatNumber", function ()

local icu = require("justenoughicu")
local icu73plus = tostring(icu.version()) >= "73.0"

SILE.documentState = { documentClass = { state = { } } }
SILE.typesetter = SILE.typesetters.base(SILE.newFrame({ id = "dummy" }))

Expand Down Expand Up @@ -104,7 +107,8 @@ describe("SILE.utilities", function()
end)

it("should format ordinal numbers", function ()
assert.is.equal("1 984.", -- N.B. Contains a non-breaking space
local expectation = icu73plus and "1 984" or "1 984."
assert.is.equal(expectation, -- N.B. Contains a non-breaking space
SU.formatNumber(1984, { style = "ordinal" }))
end)
end)
Expand All @@ -122,7 +126,8 @@ describe("SILE.utilities", function()
end)

it("should format ordinal numbers", function ()
assert.is.equal("١٬٩٨٤.", SU.formatNumber(1984, { style = "ordinal" }))
local expectation = icu73plus and "١٬٩٨٤" or "١٬٩٨٤."
assert.is.equal(expectation, SU.formatNumber(1984, { style = "ordinal" }))
end)
end)

Expand Down
6 changes: 6 additions & 0 deletions src/justenoughicu.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ int icu_compare(lua_State *L) {
// UCollationResult result = ucol_strcollIter(collation, &s1iter, &s2iter, &status);
}

int icu_version(lua_State *L) {
lua_pushstring(L, U_ICU_VERSION);
return 1;
}

#if !defined LUA_VERSION_NUM
/* Lua 5.0 */
#define luaL_Reg luaL_reg
Expand Down Expand Up @@ -522,6 +527,7 @@ static const struct luaL_Reg lib_table [] = {
{"collation_create", icu_collation_create},
{"collation_destroy", icu_collation_destroy},
{"compare", icu_compare},
{"version", icu_version},
{NULL, NULL}
};

Expand Down

0 comments on commit a733141

Please sign in to comment.