Skip to content

Commit 082ac0b

Browse files
committed
fix: enhance TinyTeX installation script
1 parent af99810 commit 082ac0b

File tree

3 files changed

+46
-13
lines changed

3 files changed

+46
-13
lines changed

.github/.devcontainer/tinytex/install.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,30 @@ install_tinytex() {
5858
mkdir -p "${TINYTEX_DIR}"
5959
curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh
6060
echo "TinyTeX installation complete."
61-
ln -s "${TINYTEX_DIR}/.TinyTeX" "${HOME}/.TinyTeX"
62-
ln -s "${TINYTEX_DIR}/.TinyTeX" "/home/${USERNAME}/.TinyTeX"
63-
ln -s "${TINYTEX_DIR}/.TinyTeX/bin/$(uname -m)-linux" /usr/local/bin/tinytex
61+
62+
# Create tinytex group and add users to it
63+
groupadd -f tinytex
64+
usermod -a -G tinytex root
65+
if [ "${USERNAME}" != "root" ]; then
66+
usermod -a -G tinytex "${USERNAME}"
67+
fi
68+
69+
# Set group ownership and permissions
70+
chgrp -R tinytex "${TINYTEX_DIR}/.TinyTeX"
71+
chmod -R 775 "${TINYTEX_DIR}/.TinyTeX"
72+
73+
# Add TinyTeX binaries to PATH for all users via /etc/profile.d/
74+
# Set TEXMFVAR and TEXMFCONFIG for all users
75+
(
76+
echo "export PATH=\"${TINYTEX_DIR}/.TinyTeX/bin/$(uname -m)-linux:\${PATH}\""
77+
echo "export TEXMFVAR=\"\${HOME}/.TinyTeX/texmf-var\""
78+
echo "export TEXMFCONFIG=\"\${HOME}/.TinyTeX/texmf-config\""
79+
) > /etc/profile.d/tinytex.sh
80+
chmod 644 /etc/profile.d/tinytex.sh
81+
82+
# mkdir -p "/home/${USERNAME}/.TinyTeX/texmf-config/web2c" "/home/${USERNAME}/.TinyTeX/texmf-var"
83+
# chown -R "${USERNAME}:${USERNAME}" "/home/${USERNAME}/.TinyTeX"
84+
# echo "TEXMFVAR = /home/${USERNAME}/.TinyTeX/texmf-var" > "/home/${USERNAME}/.TinyTeX/texmf-config/web2c/texmf.cnf"
6485
}
6586

6687
install_tinytex

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
uses: actions/checkout@v5
2121
with:
2222
persist-credentials: true
23+
fetch-tags: true
24+
fetch-depth: 0
2325

2426
- name: Create GitHub App token
2527
uses: actions/create-github-app-token@v2
@@ -51,11 +53,21 @@ jobs:
5153
git push origin --delete "${BRANCH}"
5254
fi
5355
56+
echo "$(git tag -l --sort=-v:refname | head -n 5)"
57+
5458
git checkout -b "${BRANCH}"
5559
5660
DATE=$(date +%Y-%m-%d)
57-
VERSION=$(date +%Y.%m.%d)
58-
61+
BASE_VERSION=$(date +%Y.%m.%d)
62+
63+
SUFFIX=1
64+
VERSION="${BASE_VERSION}"
65+
while [ -n "$(git tag -l "${VERSION}")" ]; do
66+
echo "Tag ${VERSION} already exists, incrementing suffix..."
67+
SUFFIX=$((SUFFIX + 1))
68+
VERSION="${BASE_VERSION}-${SUFFIX}"
69+
done
70+
echo "New version will be: ${VERSION}"
5971
sed -i "s/^version:.*/version: ${VERSION}/" CITATION.cff
6072
sed -i "s/^date-released:.*/date-released: \"${DATE}\"/" CITATION.cff
6173

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The following outputs show the `quarto check` results from the latest builds of
139139

140140
<!-- QUARTO_CHECK_RELEASE_START -->
141141
```txt
142-
Quarto 1.8.25
142+
Quarto 1.8.26
143143
[✓] Checking environment information...
144144
Quarto cache location: /home/vscode/.cache/quarto
145145
[✓] Checking versions of quarto binary dependencies...
@@ -149,7 +149,7 @@ Quarto 1.8.25
149149
Typst version 0.13.0: OK
150150
[✓] Checking versions of quarto dependencies......OK
151151
[✓] Checking Quarto installation......OK
152-
Version: 1.8.25
152+
Version: 1.8.26
153153
Path: /opt/quarto/bin
154154
155155
[✓] Checking tools....................OK
@@ -159,7 +159,7 @@ Quarto 1.8.25
159159
(|) Checking LaTeX....................[✓] Checking LaTeX....................OK
160160
Using: TinyTex
161161
Path: /home/vscode/.TinyTeX/bin/x86_64-linux
162-
Version: 2025
162+
Version: undefined
163163
164164
[✓] Checking Chrome Headless....................OK
165165
Using: Chrome found on system
@@ -190,7 +190,7 @@ Quarto 1.8.25
190190
<!-- QUARTO_CHECK_RELEASE_END -->
191191

192192
<!-- QUARTO_CHECK_RELEASE_BUILD_URL_START -->
193-
[View build log](https://github.com/mcanouil/quarto-codespaces/actions/runs/19116438134)
193+
[View build log](https://github.com/mcanouil/quarto-codespaces/actions/runs/19312004272)
194194
<!-- QUARTO_CHECK_RELEASE_BUILD_URL_END -->
195195

196196
</details>
@@ -200,7 +200,7 @@ Quarto 1.8.25
200200

201201
<!-- QUARTO_CHECK_PRERELEASE_START -->
202202
```txt
203-
Quarto 1.9.9
203+
Quarto 1.9.11
204204
[✓] Checking environment information...
205205
Quarto cache location: /home/vscode/.cache/quarto
206206
[✓] Checking versions of quarto binary dependencies...
@@ -210,7 +210,7 @@ Quarto 1.9.9
210210
Typst version 0.13.0: OK
211211
[✓] Checking versions of quarto dependencies......OK
212212
[✓] Checking Quarto installation......OK
213-
Version: 1.9.9
213+
Version: 1.9.11
214214
Path: /opt/quarto/bin
215215
216216
[✓] Checking tools....................OK
@@ -220,7 +220,7 @@ Quarto 1.9.9
220220
(|) Checking LaTeX....................[✓] Checking LaTeX....................OK
221221
Using: TinyTex
222222
Path: /home/vscode/.TinyTeX/bin/x86_64-linux
223-
Version: 2025
223+
Version: undefined
224224
225225
[✓] Checking Chrome Headless....................OK
226226
Using: Chrome found on system
@@ -251,7 +251,7 @@ Quarto 1.9.9
251251
<!-- QUARTO_CHECK_PRERELEASE_END -->
252252

253253
<!-- QUARTO_CHECK_PRERELEASE_BUILD_URL_START -->
254-
[View build log](https://github.com/mcanouil/quarto-codespaces/actions/runs/19116438134)
254+
[View build log](https://github.com/mcanouil/quarto-codespaces/actions/runs/19312004272)
255255
<!-- QUARTO_CHECK_PRERELEASE_BUILD_URL_END -->
256256

257257
</details>

0 commit comments

Comments
 (0)