Skip to content

Commit d2b1703

Browse files
authored
ci: add org project tracker scripts (#158)
* ci(check-linux): add init.zsh sync-drift detection step * fix(install.sh): verify zi.zsh exists after clone, not just directory * ci: add concurrency to checksum.yml; add smoke-test to win-install.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add color.zsh from molovo/color (MIT) * feat: add revolver from molovo/revolver (MIT) * chore: rename repo references from zi-src to src Update all internal references to reflect the repository rename: - .trunk/trunk.yaml repo name - workflow repository guards (checksum, rclone-action, deploy-gh-pages) - win-install safe.directory path - docs/README.md VSCode and jsDelivr URLs * ci: add org project tracker scripts (label sync + workflow rollout) * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sall <59910950+ss-o@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sall <59910950+ss-o@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sall <59910950+ss-o@users.noreply.github.com> * fix: address review feedback for revolver process check and installer URLs Agent-Logs-Url: https://github.com/z-shell/src/sessions/3295a818-69b9-4b0d-99f8-bf27b90e3b7c Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> * fix: validate revolver pid before liveness check Agent-Logs-Url: https://github.com/z-shell/src/sessions/3295a818-69b9-4b0d-99f8-bf27b90e3b7c Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --------- Signed-off-by: Sall <59910950+ss-o@users.noreply.github.com>
1 parent c7d9cc7 commit d2b1703

14 files changed

Lines changed: 702 additions & 12 deletions

File tree

.github/workflows/check-linux.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,8 @@ jobs:
6565
zmodload zi/zpmod
6666
zpmod source-study -l
6767
shell: zsh {0}
68+
- name: "⚙️ Check: init.zsh sync drift"
69+
run: >
70+
sh lib/sh/sync-init.sh
71+
--remote https://raw.githubusercontent.com/z-shell/src/main/lib/zsh/init.zsh
72+
--checksum-url https://raw.githubusercontent.com/z-shell/src/main/lib/zsh/init.zsh.md5

.github/workflows/checksum.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ on:
1313
permissions:
1414
contents: write
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: false
19+
1620
jobs:
1721
checksum:
18-
if: github.repository == 'z-shell/zi-src'
22+
if: github.repository == 'z-shell/src'
1923
runs-on: ubuntu-latest
2024
timeout-minutes: 10
2125
steps:

.github/workflows/deploy-gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
deploy:
18-
if: github.repository == 'z-shell/zi-src'
18+
if: github.repository == 'z-shell/src'
1919
environment:
2020
name: github-pages
2121
runs-on: ubuntu-latest

.github/workflows/rclone-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
jobs:
1919
sync:
20-
if: github.repository == 'z-shell/zi-src'
20+
if: github.repository == 'z-shell/src'
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 15
2323
env:

.github/workflows/win-install.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: 🪟 Set CRLF (Windows)
4141
run: |
4242
git config --global core.autocrlf input
43-
git config --global --add safe.directory /cygdrive/d/a/zi-src/zi-src
43+
git config --global --add safe.directory /cygdrive/d/a/src/src
4444
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4545
- name: 🪟 Dependencies (Windows)
4646
uses: egor-tensin/setup-cygwin@d2c752bab416d4b0662591bd366fc2686297c82d # v4.0.1
@@ -60,3 +60,13 @@ jobs:
6060
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
6161
sh -x ./lib/sh/install.sh -- -a zpmod
6262
shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}'
63+
- name: 🪟 Smoke-test — verify zi.zsh present
64+
run: |
65+
ZI_BIN="${XDG_DATA_HOME:-${HOME}/.local/share}/zi/bin"
66+
if [ ! -f "${ZI_BIN}/zi.zsh" ]; then
67+
printf '%s\n' "FAIL: zi.zsh not found at ${ZI_BIN}/zi.zsh"
68+
exit 1
69+
fi
70+
printf '%s\n' "OK: zi.zsh found at ${ZI_BIN}/zi.zsh"
71+
command rm -rf "${XDG_DATA_HOME:-${HOME}/.local/share}/zi" /home/runneradmin/.zi
72+
shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}'

.trunk/trunk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repo:
1010
repo:
1111
host: github.com
1212
owner: z-shell
13-
name: zi-src
13+
name: src
1414
lint:
1515
definitions:
1616
- name: shfmt

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<a target="_self" href="https://github.com/z-shell/zi-vim-syntax/">
2222
<img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" />
2323
</a>
24-
<a target="_self" href="https://open.vscode.dev/z-shell/zi-src/">
24+
<a target="_self" href="https://open.vscode.dev/z-shell/src/">
2525
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff" alt="Visual Studio Code" />
2626
</a></p><hr />
2727

@@ -38,7 +38,7 @@
3838
- IPFS:
3939
- https://ipfs.zshell.dev
4040
- jsDeliver:
41-
- https://cdn.jsdelivr.net/gh/z-shell/zi-src@main/
41+
- https://cdn.jsdelivr.net/gh/z-shell/src@main/
4242

4343
### Maintainer — Verify and Sync Loader
4444

lib/checksum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
5d8fdd881b84548f38c1d5ffc6d5f46a18919d8dd6c1398d69abe055dd76ef98 lib/sh/install_zpmod.sh
2-
9d643c40be25f71d93dd295dacc58944defe7218f961f3f3ecb4ee9c0a56d486 lib/sh/install.sh
2+
b2363e18f5dff0d94b475150922a8646d55d1c0fa2ef47dbf5f513361d111f44 lib/sh/install.sh
33
83d9f0dc013376b5aa03b7a11f3908058da176df3407ac6e2872857d7c9658fd lib/sh/sync-init.sh
44
66dc5bb0575d44e4e1192e229204abe1ac47979a05ee3c3bb23afc2b9b493637 lib/zsh/init.zsh

lib/sh/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if [ "${AOPT}" = loader ]; then
4040
ZI_CONFIG_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}/zi"
4141
command mkdir -p "${ZI_CONFIG_DIR}"
4242
if command -v curl >/dev/null 2>&1; then
43-
command curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh -o "${ZI_CONFIG_DIR}/init.zsh"
43+
command curl -fsSL https://raw.githubusercontent.com/z-shell/src/main/lib/zsh/init.zsh -o "${ZI_CONFIG_DIR}/init.zsh"
4444
elif command -v wget >/dev/null 2>&1; then
45-
command wget -qO "${ZI_CONFIG_DIR}/init.zsh" https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh
45+
command wget -qO "${ZI_CONFIG_DIR}/init.zsh" https://raw.githubusercontent.com/z-shell/src/main/lib/zsh/init.zsh
4646
fi
4747
command chmod go-w "${ZI_CONFIG_DIR}" && command chmod a+x "${ZI_CONFIG_DIR}/init.zsh"
4848
# shellcheck disable=SC2016
@@ -91,7 +91,7 @@ else
9191
printf '%s\n' "▓▒░ Installing (z-shell/zi) plugin manager at ${ZI_HOME}/${ZI_BIN_DIR_NAME}"
9292
{ git clone --progress --depth=1 --branch "${BOPT}" https://github.com/z-shell/zi.git "${ZI_BIN_DIR_NAME}" \
9393
2>&1 | { /tmp/zi/git-process-output.zsh || cat; }; } 2>/dev/null
94-
if [ -d "${ZI_HOME}/${ZI_BIN_DIR_NAME}" ]; then
94+
if [ -d "${ZI_HOME}/${ZI_BIN_DIR_NAME}" ] && [ -f "${ZI_HOME}/${ZI_BIN_DIR_NAME}/zi.zsh" ]; then
9595
printf '%s\n' "▓▒░ Successfully installed at ${ZI_HOME}/${ZI_BIN_DIR_NAME}".
9696
else
9797
printf '%s\n' "▓▒░ Something went wrong, couldn't install ZI at ${ZI_HOME}/${ZI_BIN_DIR_NAME}"
@@ -181,7 +181,7 @@ ZPMOD_PROFILE() {
181181
_zpmod_sh="${_script_dir}/install_zpmod.sh"
182182
else
183183
_zpmod_sh="${WORKDIR}/install_zpmod.sh"
184-
_zpmod_url="https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install_zpmod.sh"
184+
_zpmod_url="https://raw.githubusercontent.com/z-shell/src/main/lib/sh/install_zpmod.sh"
185185
if command -v curl >/dev/null 2>&1; then
186186
command curl -fsSL "${_zpmod_url}" -o "${_zpmod_sh}"
187187
elif command -v wget >/dev/null 2>&1; then

lib/zsh/snippets/color.zsh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env zsh
2+
# Source: https://github.com/molovo/color
3+
# License: MIT — Copyright (c) 2015 Joe Letchford
4+
# Maintained by z-shell/src — https://github.com/z-shell/src
5+
#
6+
7+
function color() {
8+
local color=$1 style=$2 b=0
9+
10+
shift
11+
12+
case $style in
13+
bold|b) b=1; shift ;;
14+
italic|i) b=2; shift ;;
15+
underline|u) b=4; shift ;;
16+
inverse|in) b=7; shift ;;
17+
strikethrough|s) b=9; shift ;;
18+
esac
19+
20+
case $color in
21+
black|b) echo "\033[${b};30m${@}\033[0;m" ;;
22+
red|r) echo "\033[${b};31m${@}\033[0;m" ;;
23+
green|g) echo "\033[${b};32m${@}\033[0;m" ;;
24+
yellow|y) echo "\033[${b};33m${@}\033[0;m" ;;
25+
blue|bl) echo "\033[${b};34m${@}\033[0;m" ;;
26+
magenta|m) echo "\033[${b};35m${@}\033[0;m" ;;
27+
cyan|c) echo "\033[${b};36m${@}\033[0;m" ;;
28+
white|w) echo "\033[${b};37m${@}\033[0;m" ;;
29+
*) echo "\033[${b};38;5;$(( ${color} ))m${@}\033[0;m" ;;
30+
esac
31+
}
32+
33+
color "$@"

0 commit comments

Comments
 (0)