Compare commits

...
2 Commits
Author SHA1 Message Date
lazar ea637c9067 fix: pass version via env var instead of template in build script
The {{version}} template is only interpolated for the env: and asset:
fields, not for the build.run script (which is passed verbatim to bash).
Move the version into env: as VERSION="{{version}}" and reference it
as $VERSION in the script.
2026-07-18 16:47:18 +02:00
lazar f987b93f81 fix: replace heredoc with printf in build script
The heredoc inside the YAML block scalar (|) broke YAML parsing because
the heredoc body lines (#!/bin/bash, exec lua...) were at column 0,
which YAML interpreted as top-level keys. The ':' in the exec line
triggered 'could not find expected ':'' parse errors.

Replace with printf to keep the entire build script as properly-indented
YAML block scalar content. This also fixes the mason UI crash where the
newline-containing error message triggered 'replacement string item
contains newlines' in nvim_buf_set_lines.
2026-07-18 16:41:49 +02:00
+4 -5
View File
@@ -12,14 +12,13 @@ categories:
source:
id: pkg:generic/tia-lsp@0.1.0
build:
env:
VERSION: "{{version}}"
run: |
git clone --depth 1 --branch v{{version}} https://gitea.l-tech.rs/lazar/tia-lsp.git tia-lsp-src
git clone --depth 1 --branch "v$VERSION" https://gitea.l-tech.rs/lazar/tia-lsp.git tia-lsp-src
cp -r tia-lsp-src/src ./src
mkdir -p bin
cat > bin/tia-lsp << 'EOF'
#!/bin/bash
exec lua "$(dirname "$0")/../src/main.lua" "$@"
EOF
printf '#!/bin/bash\nexec lua "$(dirname "$0")/../src/main.lua" "$@"\n' > bin/tia-lsp
chmod +x bin/tia-lsp
bin: