Skip to content

Commit 31b10db

Browse files
authored
fix(ci): fix rclone docker build and update checksums (#162)
* fix(ci): resolve conflicts and complete lib to public migration - Adopt latest changes from main - Update rclone action to v1.1.1 - Complete migration of lib/ to public/ - Update README and workflow triggers * fix(ci): complete lib→public migration; update installer scripts and tests - Update sync-init.sh with explicit --local/--remote/--checksum-url args - Update check-linux.yml to pass explicit args to sync-init.sh - Improve install.sh and install_zpmod.sh with better error handling - Update checksums after public/ path changes - Expand tests/installers.sh coverage * chore(meta): secure workflows and unify agent instructions --------- Co-authored-by: ss-o <ss-o@users.noreply.github.com>
1 parent 5695594 commit 31b10db

23 files changed

Lines changed: 340 additions & 183 deletions

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "05:30"
9+
timezone: "UTC"
10+
open-pull-requests-limit: 5
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"

.github/renovate.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/check-linux.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- "lib/sh/**"
8-
- "lib/zsh/**"
7+
- "public/sh/**"
8+
- "public/zsh/**"
99
- "tests/**"
1010
- ".github/workflows/check-linux.yml"
1111
pull_request:
1212
branches: [main]
1313
paths:
14-
- "lib/sh/**"
15-
- "lib/zsh/**"
14+
- "public/sh/**"
15+
- "public/zsh/**"
1616
- "tests/**"
1717
- ".github/workflows/check-linux.yml"
1818
workflow_dispatch:
@@ -34,7 +34,7 @@ jobs:
3434
- name: ☑️ ShellCheck
3535
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
3636
with:
37-
scandir: "./lib/sh"
37+
scandir: "./public/sh"
3838

3939
build:
4040
runs-on: ubuntu-latest
@@ -50,20 +50,20 @@ jobs:
5050
- name: "⚙️ Check: unit fixtures"
5151
run: sh ./tests/installers.sh
5252
- name: "⚙️ Check: install.sh -- -i skip"
53-
run: sh -x ./lib/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
53+
run: sh -x ./public/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5454
- name: "⚙️ Check: install.sh -- -a annex"
55-
run: sh -x ./lib/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
55+
run: sh -x ./public/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5656
- name: "⚙️ Check: install.sh -- -a loader"
57-
run: sh -x ./lib/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
57+
run: sh -x ./public/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5858
- name: "⚙️ Check: install.sh -- -a zunit"
59-
run: sh -x ./lib/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
59+
run: sh -x ./public/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
6060
- name: "⚙️ Check: install_zpmod.sh"
61-
run: sh -x ./lib/sh/install_zpmod.sh
61+
run: sh -x ./public/sh/install_zpmod.sh
6262
- name: ⚙️ Load zpmod module
6363
run: |
6464
module_path+=( "${XDG_DATA_HOME:-$HOME/.local/share}/zi/zmodules/zpmod/Src" )
6565
zmodload zi/zpmod
6666
zpmod source-study -l
6767
shell: zsh {0}
6868
- name: "⚙️ Check: init.zsh sync drift"
69-
run: sh lib/sh/sync-init.sh
69+
run: sh public/sh/sync-init.sh --local ./public/zsh/init.zsh --remote ./public/zsh/init.zsh --checksum-url ./public/checksum.txt

.github/workflows/check-macos.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on:
55
push:
66
branches: [main]
77
paths:
8-
- "lib/sh/**"
9-
- "lib/zsh/**"
8+
- "public/sh/**"
9+
- "public/zsh/**"
1010
- "tests/**"
1111
- ".github/workflows/check-macos.yml"
1212
pull_request:
1313
branches: [main]
1414
paths:
15-
- "lib/sh/**"
16-
- "lib/zsh/**"
15+
- "public/sh/**"
16+
- "public/zsh/**"
1717
- "tests/**"
1818
- ".github/workflows/check-macos.yml"
1919
workflow_dispatch:
@@ -35,7 +35,7 @@ jobs:
3535
- name: ☑️ ShellCheck
3636
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
3737
with:
38-
scandir: "./lib/sh"
38+
scandir: "./public/sh"
3939

4040
build:
4141
runs-on: macos-latest
@@ -50,15 +50,15 @@ jobs:
5050
- name: "⚙️ Check: unit fixtures"
5151
run: sh ./tests/installers.sh
5252
- name: "⚙️ Check: install.sh -- -i skip"
53-
run: sh -x ./lib/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
53+
run: sh -x ./public/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5454
- name: "⚙️ Check: install.sh -- -a annex"
55-
run: sh -x ./lib/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
55+
run: sh -x ./public/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5656
- name: "⚙️ Check: install.sh -- -a loader"
57-
run: sh -x ./lib/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
57+
run: sh -x ./public/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
5858
- name: "⚙️ Check: install.sh -- -a zunit"
59-
run: sh -x ./lib/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
59+
run: sh -x ./public/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
6060
- name: "⚙️ Check: install_zpmod.sh"
61-
run: sh -x ./lib/sh/install_zpmod.sh
61+
run: sh -x ./public/sh/install_zpmod.sh
6262
- name: ⚙️ Load zpmod module
6363
run: |
6464
module_path+=( "${XDG_DATA_HOME:-$HOME/.local/share}/zi/zmodules/zpmod/Src" )

.github/workflows/checksum.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: "🆗 Checksum"
33
on:
44
push:
55
paths:
6-
- "lib/sh/install_zpmod.sh"
7-
- "lib/sh/install.sh"
8-
- "lib/sh/sync-init.sh"
9-
- "lib/zsh/init.zsh"
6+
- "public/sh/install_zpmod.sh"
7+
- "public/sh/install.sh"
8+
- "public/sh/sync-init.sh"
9+
- "public/zsh/init.zsh"
1010
- ".github/workflows/checksum.yml"
1111
workflow_dispatch: {}
1212

@@ -28,15 +28,15 @@ jobs:
2828
uses: jmgilman/actions-generate-checksum@3ea6dc9bf8eecf28e2ecc982fab683484a1a8561 # v1.0.1
2929
with:
3030
patterns: |
31-
lib/sh/install_zpmod.sh
32-
lib/sh/install.sh
33-
lib/sh/sync-init.sh
34-
lib/zsh/init.zsh
35-
- run: mv checksum.txt lib/
31+
public/sh/install_zpmod.sh
32+
public/sh/install.sh
33+
public/sh/sync-init.sh
34+
public/zsh/init.zsh
35+
- run: mv checksum.txt public/
3636
- name: "🆗 Commit"
37-
uses: z-shell/.github/actions/commit@d36763069484d7b5bf3d958e8517dbb682942c82 # v1.0.9
37+
uses: z-shell/.github/actions/commit@3222f53692e448ed6e2caf8b8722e74fb2ca2461 # v1.1.1
3838
with:
3939
commitMessage: Checksum ${{ github.sha }}
40-
workDir: lib
40+
workDir: public
4141
commitUserName: ${{ secrets.ACTIONS_USER }}
4242
commitUserEmail: ${{ secrets.ACTIONS_MAIL }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88
tags: ["v*.*.*"]
99
paths:
10-
- "lib/**"
10+
- "public/**"
1111
- ".github/workflows/deploy-gh-pages.yml"
1212

1313
permissions:
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
github_token: ${{ secrets.GITHUB_TOKEN }}
5151
publish_branch: gh-pages
52-
publish_dir: ./lib
52+
publish_dir: ./public
5353
user_name: ${{ secrets.ACTIONS_USER }}
5454
user_email: ${{ secrets.ACTIONS_MAIL }}
5555
commit_message: ${{ steps.prepare_deploy.outputs.commit_message }}

.github/workflows/rclone-action.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
name: "🔄 Rclone"
33
on:
44
push:
5-
branches: [main]
6-
paths:
7-
- "lib/**"
8-
- ".github/workflows/rclone-action.yml"
5+
branches: [gh-pages]
96
workflow_dispatch: {}
107

118
permissions:
@@ -21,13 +18,13 @@ jobs:
2118
runs-on: ubuntu-latest
2219
timeout-minutes: 15
2320
env:
24-
local_path: "lib"
21+
local_path: "."
2522
remote_path: "r2:r2-store/src"
2623
steps:
2724
- name: "⤵️ Check out code from GitHub"
2825
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2926
- name: "⏫ Run rclone/r2-store"
30-
uses: z-shell/.github/actions/rclone@d36763069484d7b5bf3d958e8517dbb682942c82 # v1.0.9
27+
uses: z-shell/.github/actions/rclone@3222f53692e448ed6e2caf8b8722e74fb2ca2461 # v1.1.1
3128
with:
3229
config: ${{ secrets.R2_STORE }}
3330
args: "copy --check-first ${{ env.local_path }} ${{ env.remote_path }}"

.github/workflows/win-install.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ name: ⚙️ Windows Install
44
on:
55
pull_request:
66
paths:
7-
- "lib/sh/**"
8-
- "lib/zsh/**"
7+
- "public/sh/**"
8+
- "public/zsh/**"
99
- "tests/**"
1010
- ".github/workflows/win-install.yml"
1111
push:
1212
paths:
13-
- "lib/sh/**"
14-
- "lib/zsh/**"
13+
- "public/sh/**"
14+
- "public/zsh/**"
1515
- "tests/**"
1616
- ".github/workflows/win-install.yml"
1717
workflow_dispatch: {}
@@ -28,7 +28,7 @@ jobs:
2828
- name: ☑️ ShellCheck
2929
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
3030
with:
31-
scandir: "./lib/sh"
31+
scandir: "./public/sh"
3232
run-install:
3333
runs-on: windows-latest
3434
timeout-minutes: 30
@@ -50,15 +50,15 @@ jobs:
5050
- name: 🪟 Run Install
5151
run: |
5252
sh ./tests/installers.sh
53-
sh -x ./lib/sh/install.sh -- -i skip
53+
sh -x ./public/sh/install.sh -- -i skip
5454
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
55-
sh -x ./lib/sh/install.sh -- -a annex
55+
sh -x ./public/sh/install.sh -- -a annex
5656
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
57-
sh -x ./lib/sh/install.sh -- -a loader
57+
sh -x ./public/sh/install.sh -- -a loader
5858
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
59-
sh -x ./lib/sh/install.sh -- -a zunit
59+
sh -x ./public/sh/install.sh -- -a zunit
6060
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
61-
sh -x ./lib/sh/install.sh -- -a zpmod
61+
sh -x ./public/sh/install.sh -- -a zpmod
6262
shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}'
6363
- name: 🪟 Smoke-test — verify zi.zsh present
6464
run: |

docs/README.md

Lines changed: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,76 @@
1-
<h1 align="center">
2-
<p>
3-
<a href="https://github.com/z-shell/zi">
4-
<img src="https://raw.githubusercontent.com/z-shell/.github/main/profile/img/logo.png" alt="Logo" width="80" height="80" />❮ Zi ❯
5-
</a>
6-
</p>
7-
</h1>
8-
<h3 align="center">
9-
<a href="https://github.com/orgs/z-shell/discussions/">《❔》Ask a Question </a>
10-
<a href="https://wiki.zshell.devv/search/">《💡》Search Wiki </a>
11-
<a href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+">《💜》Join </a>
12-
<a href="https://translate.zshell.dev">《🌐》Localize </a>
13-
</h3>
14-
<p align="center">
15-
<a target="_self" href="https://translate.zshell.dev">
16-
<img alt="Crowdin" align="center" src="https://badges.crowdin.net/e/f108c12713ee8526ac878d5671ad6e29/localized.svg" />
17-
</a>
18-
<a target="_self" href="https://www.gnu.org/licenses/gpl-3.0/">
19-
<img align="center" src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" alt="Project License" />
20-
</a>
21-
<a target="_self" href="https://github.com/z-shell/zi-vim-syntax/">
22-
<img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" />
23-
</a>
24-
<a target="_self" href="https://open.vscode.dev/z-shell/src/">
25-
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff" alt="Visual Studio Code" />
26-
</a></p><hr />
1+
<!-- markdownlint-disable MD041 -->
2+
<table style="background-color:transparent;">
3+
<tr>
4+
<td>
5+
<h1 align="center">
6+
<a target="_self" href="https://github.com/z-shell/zi">
7+
<img style="width: 60px; height: 60px"
8+
src="https://raw.githubusercontent.com/z-shell/zi/main/docs/images/logo.svg" alt="❮ Zi ❯ Logo" />
9+
</a>❮ <strong>Src</strong> ❯
10+
</h1>
11+
<h2 align="center">
12+
✨ Z-Shell source library — snippets, installer scripts and shared utilities
13+
</h2>
14+
<div align="center">
15+
<a href="https://github.com/orgs/z-shell/discussions/"><strong>《 Ask a Question 》</strong></a>
16+
·
17+
<a href="https://wiki.zshell.dev/search"><strong>《💡》Search Wiki </strong></a>
18+
·
19+
<a
20+
href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+"><strong>《💜》Join
21+
</strong></a>
22+
·
23+
<a href="https://translate.zshell.dev/"><strong>《🌐》Localize </strong></a>
24+
</div>
25+
</tr>
26+
</td>
27+
<tr>
28+
<td>
29+
<div align="center">
30+
<a title="Crowdin" target="_self" href="https://translate.zshell.dev/">
31+
<img align="center" src="https://badges.crowdin.net/e/f108c12713ee8526ac878d5671ad6e29/localized.svg" alt="Crowdin Status" />
32+
</a>
33+
<a title="License" target="_self" href="https://www.gnu.org/licenses/gpl-3.0/">
34+
<img align="center" src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" alt="Project License" />
35+
</a>
36+
<a title="VIM" target="_self" href="https://github.com/z-shell/zi-vim-syntax/">
37+
<img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" />
38+
</a>
39+
<a target="_self" href="https://open.vscode.dev/z-shell/src/">
40+
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff"
41+
alt="Visual Studio Code" />
42+
</a>
43+
</div>
44+
</tr>
45+
</td>
46+
</table>
47+
<hr />
2748

2849
### Content
2950

30-
- Wiki Pages:
31-
- https://wiki.zshell.dev
32-
- Loader:
33-
- https://init.zshell.dev
34-
- Installer:
35-
- https://get.zshell.dev
36-
- R2:
37-
- https://r2.zshell.dev
38-
- IPFS:
39-
- https://ipfs.zshell.dev
40-
- jsDeliver:
41-
- https://cdn.jsdelivr.net/gh/z-shell/src@main/
51+
- **Wiki Pages**: [wiki.zshell.dev](https://wiki.zshell.dev)
52+
- **Loader**: [init.zshell.dev](https://init.zshell.dev)
53+
- **Installer**: [get.zshell.dev](https://get.zshell.dev)
54+
- **jsDeliver CDN**: [cdn.jsdelivr.net/gh/z-shell/src@main/](https://cdn.jsdelivr.net/gh/z-shell/src@main/)
4255

4356
### Maintainer — Verify and Sync Loader
4457

45-
Check whether the local `lib/zsh/init.zsh` matches the canonical GitHub raw `main` copy:
58+
Check whether the local `public/zsh/init.zsh` matches the canonical GitHub raw `main` copy:
4659

4760
```sh
48-
sh lib/sh/sync-init.sh
61+
sh public/sh/sync-init.sh
4962
```
5063

5164
Replace the local file if it drifts:
5265

5366
```sh
54-
sh lib/sh/sync-init.sh --write
67+
sh public/sh/sync-init.sh --write
5568
```
5669

5770
Run against local fixtures (no network required, useful in tests):
5871

5972
```sh
60-
sh lib/sh/sync-init.sh \
73+
sh public/sh/sync-init.sh \
6174
--local /tmp/my-init.zsh \
6275
--remote /tmp/remote-init.zsh \
6376
--checksum-url /tmp/checksum.txt
@@ -66,5 +79,9 @@ sh lib/sh/sync-init.sh \
6679
Skip checksum validation:
6780

6881
```sh
69-
sh lib/sh/sync-init.sh --no-checksum
82+
sh public/sh/sync-init.sh --no-checksum
7083
```
84+
85+
---
86+
87+
> This repository is compatible with [Zi](https://github.com/z-shell/zi)

lib/checksum.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)