dev #2
3 changed files with 35 additions and 6 deletions
|
|
@ -24,7 +24,12 @@ jobs:
|
||||||
kcoreaddons kpmcore libpwquality qt6-declarative qt6-svg yaml-cpp
|
kcoreaddons kpmcore libpwquality qt6-declarative qt6-svg yaml-cpp
|
||||||
useradd -m builder
|
useradd -m builder
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --depth 1 "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" /home/builder/src
|
# Clone the branch/tag that triggered this run (not the default
|
||||||
|
# branch) — same as bibata.yml/powerlevel10k.yml/yay-bin.yml, so a
|
||||||
|
# push to a feature branch (or a release tag) builds and publishes
|
||||||
|
# from that ref, not whatever happens to be on the default branch.
|
||||||
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
|
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" /home/builder/src
|
||||||
chown -R builder:builder /home/builder/src
|
chown -R builder:builder /home/builder/src
|
||||||
su builder -c "cd /home/builder/src/packaging/calamares && makepkg -f --noconfirm --nocheck"
|
su builder -c "cd /home/builder/src/packaging/calamares && makepkg -f --noconfirm --nocheck"
|
||||||
PKG=$(find /home/builder/src/packaging/calamares -name '*.pkg.tar.zst' | head -1)
|
PKG=$(find /home/builder/src/packaging/calamares -name '*.pkg.tar.zst' | head -1)
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,18 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# bread-theme is not in the bakery index; build it at the tag pinned
|
# bread-theme is not in the bakery index; build it at the tag pinned
|
||||||
# in bos-settings/Cargo.toml so the CLI matches the library version.
|
# in bos-settings' Cargo.toml so the CLI matches the library version
|
||||||
THEME_TAG=$(grep 'bread-theme.*tag' /bos/bos-settings/Cargo.toml \
|
# the bos-settings package (and breadbar/breadbox/breadpad) were
|
||||||
|
# built against. bos-settings used to live at bos-settings/Cargo.toml
|
||||||
|
# inside this repo; it's since been split into its own repo
|
||||||
|
# (git.breadway.dev/Breadway/bos-settings), so fetch its Cargo.toml
|
||||||
|
# from there instead of a path that no longer exists in this
|
||||||
|
# checkout. Uses bos-settings' default branch (dev) — the branch its
|
||||||
|
# own CI actually publishes the `bos-settings` pacman package from.
|
||||||
|
REPO_OWNER="${GITHUB_REPOSITORY%%/*}"
|
||||||
|
curl -fsSL "https://git.breadway.dev/${REPO_OWNER}/bos-settings/raw/branch/dev/Cargo.toml" \
|
||||||
|
-o /tmp/bos-settings-Cargo.toml
|
||||||
|
THEME_TAG=$(grep 'bread-theme.*tag' /tmp/bos-settings-Cargo.toml \
|
||||||
| grep -oP '"v[^"]+"' | tr -d '"')
|
| grep -oP '"v[^"]+"' | tr -d '"')
|
||||||
echo "Building bread-theme @ $THEME_TAG"
|
echo "Building bread-theme @ $THEME_TAG"
|
||||||
git clone --branch "$THEME_TAG" --depth 1 \
|
git clone --branch "$THEME_TAG" --depth 1 \
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,23 @@
|
||||||
|
|
||||||
local M = bread.module({ name = "breadhelp-tour", version = "1.0.0" })
|
local M = bread.module({ name = "breadhelp-tour", version = "1.0.0" })
|
||||||
|
|
||||||
|
-- `bread.exec` only takes a single shell command string — it always runs it
|
||||||
|
-- as `sh -lc <cmd>` (see breadd's Lua runtime), there's no array-exec form
|
||||||
|
-- that bypasses the shell. `event.data.class` (a Wayland window class) and
|
||||||
|
-- `event.data.data` (a layer-shell namespace) are both arbitrary strings a
|
||||||
|
-- client fully controls — a window/surface can name itself
|
||||||
|
-- `x; rm -rf ~ #` and have that land in a real shell command otherwise.
|
||||||
|
-- POSIX single-quoting neutralizes that: wrap the value in single quotes,
|
||||||
|
-- and turn any single quote *inside* it into `'\''` (close the quote, an
|
||||||
|
-- escaped literal quote, reopen the quote) — the one escaping rule `sh`
|
||||||
|
-- needs to treat the whole thing as inert data, never command syntax.
|
||||||
|
local function shell_quote(s)
|
||||||
|
return "'" .. tostring(s):gsub("'", "'\\''") .. "'"
|
||||||
|
end
|
||||||
|
|
||||||
function M.on_load()
|
function M.on_load()
|
||||||
bread.on("bread.window.opened", function(event)
|
bread.on("bread.window.opened", function(event)
|
||||||
bread.exec("breadhelp --tour-event window:" .. event.data.class)
|
bread.exec("breadhelp --tour-event " .. shell_quote("window:" .. event.data.class))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
bread.on("bread.workspace.changed", function(event)
|
bread.on("bread.workspace.changed", function(event)
|
||||||
|
|
@ -28,11 +42,11 @@ function M.on_load()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
bread.hyprland.on_raw("openlayer", function(event)
|
bread.hyprland.on_raw("openlayer", function(event)
|
||||||
bread.exec("breadhelp --tour-event layer:" .. event.data.data)
|
bread.exec("breadhelp --tour-event " .. shell_quote("layer:" .. event.data.data))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
bread.hyprland.on_raw("closelayer", function(event)
|
bread.hyprland.on_raw("closelayer", function(event)
|
||||||
bread.exec("breadhelp --tour-event layer-closed:" .. event.data.data)
|
bread.exec("breadhelp --tour-event " .. shell_quote("layer-closed:" .. event.data.data))
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue