Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "next"
schedule:
interval: "weekly"
day: "monday"
Expand Down
3 changes: 1 addition & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"local>z-shell/.github:renovate-config",
":dependencyDashboardApproval",
":disableVulnerabilityAlerts"
],
"baseBranchPatterns": ["next"]
]
}
7 changes: 2 additions & 5 deletions .github/workflows/check-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ on:
- ".github/workflows/check-linux.yml"
pull_request:
branches: [main]
paths:
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-linux.yml"
workflow_dispatch:

permissions:
Expand All @@ -26,6 +21,7 @@ concurrency:

jobs:
shellcheck:
name: Linux ShellCheck
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -37,6 +33,7 @@ jobs:
scandir: "./public/sh"

build:
name: Linux Installer and Loader
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [shellcheck]
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/check-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ on:
- ".github/workflows/check-macos.yml"
pull_request:
branches: [main]
paths:
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-macos.yml"
workflow_dispatch:

permissions:
Expand All @@ -27,6 +22,7 @@ concurrency:

jobs:
shellcheck:
name: macOS ShellCheck
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -38,6 +34,7 @@ jobs:
scandir: "./public/sh"

build:
name: macOS Installer and Loader
runs-on: macos-latest
timeout-minutes: 30
needs: [shellcheck]
Expand All @@ -46,7 +43,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: ⚙️ Prepare dependencies
run: |
brew install zsh
brew install autoconf zsh
- name: "⚙️ Generate checksums"
run: sh ./public/sh/generate-checksums.sh
- name: "⚙️ Check: unit fixtures"
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/main-branch-guard.yml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/zsh-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ name: Zsh Lint

on:
push:
branches: [next, main]
branches: [main]
paths:
- "public/zsh/init.zsh"
- ".github/workflows/zsh-lint.yml"
- "zsh-lint.json"
pull_request:
branches: [next, main]
paths:
- "public/zsh/init.zsh"
- ".github/workflows/zsh-lint.yml"
- "zsh-lint.json"
branches: [main]
workflow_dispatch: {}

permissions:
Expand Down
14 changes: 13 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ This project follows the organization-wide [Z-Shell Organization Guidelines](htt

## What this is

`src` contains the core Zi loader scripts, installer mechanisms, CDN assets, and sync utilities.
`src` contains the core Zi loader scripts, installer mechanisms, CDN assets,
and sync utilities.

## Branching

- This repository uses trunk-based development on `main` per organization ADR
0019. Create short-lived branches from `main` and target pull requests to
`main`.
- Use the organization branch names `feature-<id>`, `bug-<id>`, or
`hotfix-<id>`.
- Keep `main` deployable; deployment remains a separately verified workflow
result after merge.

## Conventions & Testing

Expand All @@ -14,6 +25,7 @@ This project follows the organization-wide [Z-Shell Organization Guidelines](htt
and, for Zsh files, the
[Zsh Scripting Standard](https://github.com/z-shell/.github/blob/main/.github/instructions/zsh-scripting.instructions.md).
- Verify installer and loader behavior with the repository test suite:

```sh
sh ./tests/installers.sh
```
2 changes: 1 addition & 1 deletion public/checksum.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0140801e80b2d8767e95d215850b6feab3642ee2b6fd70fbf4aab09afcfe7fca public/sh/install_zpmod.sh
6de66efba021ebcf462e7672577d9f6876f13db55691f04e7009ff7e78d658b8 public/sh/install_zpmod.sh
6ee1ced1b73ab9d6f8a17e26505dd5de588b2a0af2832603ae04eb2866763ed9 public/sh/install.sh
08cc893ceb982fc99d17db1966c6c30790cc571e16e4f5392352d995f5252952 public/sh/sync-init.sh
424d66dca9bc26dd225afa45ccf15e42c8cf1f9e5e68fa51b469969bb5d51901 public/zsh/init.zsh
52 changes: 50 additions & 2 deletions public/sh/install_zpmod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ setup_zpmod_repository() {
cd "${MOD_HOME}" || exit 1
git pull -q origin main
else
git clone --depth 10 -q https://github.com/z-shell/zpmod.git "${MOD_HOME}"
git clone --depth 10 --recurse-submodules --shallow-submodules -q \
https://github.com/z-shell/zpmod.git "${MOD_HOME}"
fi
git -C "${MOD_HOME}" submodule update --init --recursive -q
}

build_zpmod_module() {
Expand All @@ -70,8 +72,54 @@ build_zpmod_module() {
(
printf '%s\n' "${col_info2}-- Zsh version ${ZSH_CURRENT} --${col_rst}"
cd "${MOD_HOME}" || exit 1
printf '%s\n' "${col_pname}== Building module ZPMOD, running: a make clean, then ./configure and then make ==${col_rst}"
printf '%s\n' "${col_pname}== The module sources are located at: ${MOD_HOME} ==${col_rst}"
if test -f CMakeLists.txt; then
for _required_command in autoconf cc cmake make; do
if ! command -v "${_required_command}" >/dev/null 2>&1; then
printf '%s\n' "${col_error}Required build command not found: ${_required_command}.${col_rst}"
exit 1
fi
done
printf '%s\n' "${col_pname}== Building module ZPMOD with CMake ==${col_rst}"
_clean_arg=""
if [ "${1-}" = "--clean" ]; then
_clean_arg="--clean"
fi
# shellcheck disable=SC2086
zsh ./scripts/cmake.configure.zsh \
--generator make --build-type Release -j 4 ${_clean_arg}

_staged_file=""
for _candidate in \
build-cmake/stage/lib/zsh/site-modules/zpmod.so \
build-cmake/stage/lib/zsh/site-modules/zpmod.bundle \
build-cmake/stage/lib/zsh/site-modules/zpmod.dylib \
build-cmake/stage/lib/zsh/site-modules/zpmod.dll \
build-cmake/out/lib/zpmod.so \
build-cmake/out/lib/zpmod.bundle \
build-cmake/out/lib/zpmod.dylib \
build-cmake/out/lib/zpmod.dll
do
if test -f "${_candidate}"; then
_staged_file="${_candidate}"
break
fi
done
if [ -z "${_staged_file}" ]; then
printf '%s\n' "${col_error}Module artifact was not produced.${col_rst}"
exit 1
fi

mkdir -p Src/zi
cp -f "${_staged_file}" Src/zi/zpmod.so
cp -f "${_staged_file}" Src/zi/zpmod.bundle
cp -f "${_staged_file}" zpmod.so
date +%s > COMPILED_AT
printf '%s\n' "${col_info2}-- Module built successfully --${col_rst}"
exit 0
fi

printf '%s\n' "${col_pname}== Building module ZPMOD, running: a make clean, then ./configure and then make ==${col_rst}"
if test -f Makefile; then
if [ "${1-}" = "--clean" ]; then
printf '%s\n' "${col_info2}-- make distclean --${col_rst}"
Expand Down
Loading