Commit 79169a0
Eric Bower
·
2026-06-12 22:06:41 -0400 EDT
parent af94b80
chore(ci): upload static site on main
2 files changed,
+19,
-13
+1,
-2
| ... | ... | @@ -12,6 +12,5 @@ WORKDIR /app | |
| 12 | 12 | ||
| 13 | 13 | CMD ["sh", "-c", " \ | |
| 14 | 14 | cat README.md | pdocs -tmpl index.tmpl -toc | ssh pgs.sh /zmx/index.html && \ | |
| 15 | - | rsync -v ./logo.png pgs.sh:/zmx/ && \ | |
| 16 | - | rsync -rv dist/ pgs.sh:/zmx/a \ | |
| 15 | + | rsync -v ./logo.png pgs.sh:/zmx/ \ | |
| 17 | 16 | "] |
M
pico.sh
+18,
-11
| ... | ... | @@ -2,23 +2,34 @@ | |
| 2 | 2 | set -euo pipefail | |
| 3 | 3 | ||
| 4 | 4 | export ZMX_SESSION_PREFIX="${ZMX_SESSION_PREFIX:-ci.zmx.}" | |
| 5 | - | EVENT_TYPE="${PICO_CI_EVENT_TYPE:-manual}" | |
| 5 | + | EVENT="${PICI_EVENT:-manual}" | |
| 6 | 6 | ||
| 7 | - | echo "running ci event=${EVENT_TYPE} session=${ZMX_SESSION_PREFIX}" | |
| 7 | + | echo "running ci event=${EVENT} session=${ZMX_SESSION_PREFIX}" | |
| 8 | 8 | ||
| 9 | 9 | zmx run build docker build -t zig-zmx . | |
| 10 | 10 | zmx run fmt -d docker run --rm -t zig-zmx:latest zig fmt --check . | |
| 11 | 11 | zmx run test -d docker run --rm -t zig-zmx:latest zig build test | |
| 12 | - | zmx run integration -d docker run --rm -t zig-zmx:latest bats test/session.bats | |
| 12 | + | zmx run integration -d docker run --rm -t zig-zmx:latest bats test/*.bats | |
| 13 | 13 | zmx wait "*" | |
| 14 | 14 | ||
| 15 | - | if [[ $EVENT_TYPE != "git.tag" ]]; then | |
| 15 | + | zmx run upload-build docker build -t zmx-upload -f Dockerfile.upload . | |
| 16 | + | ||
| 17 | + | if [[ $PICI_BRANCH = "main" ]]; then | |
| 18 | + | zmx run upload docker run --rm \ | |
| 19 | + | -v "$(pwd)/README.md:/app/README.md:ro" \ | |
| 20 | + | -v "$(pwd)/logo.png:/app/logo.png:ro" \ | |
| 21 | + | -v "$(pwd)/index.tmpl:/app/index.tmpl:ro" \ | |
| 22 | + | -v ~/.ssh:/root/.ssh:ro \ | |
| 23 | + | zmx-upload | |
| 24 | + | fi | |
| 25 | + | ||
| 26 | + | if [[ $EVENT != "git.tag" ]]; then | |
| 16 | 27 | echo "success!" | |
| 17 | 28 | exit 0 | |
| 18 | 29 | fi | |
| 19 | 30 | ||
| 20 | - | TAG="${PICO_CI_TAG_NAME}" | |
| 21 | - | NEW_VERSION="${PICO_CI_TAG_NAME#v}" | |
| 31 | + | TAG="${PICI_TAG}" | |
| 32 | + | NEW_VERSION="${PICI_TAG#v}" | |
| 22 | 33 | ||
| 23 | 34 | zmx run semver sed -i "s/\.version = \"[^\"]*\"/.version = \"$NEW_VERSION\"/" build.zig.zon && cat build.zig.zon | |
| 24 | 35 | zmx run update-readme sed -i "s/zmx-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/zmx-$NEW_VERSION/g" README.md |
| ... | ... | @@ -26,14 +37,10 @@ zmx run build-release -d docker run --rm -t zig-zmx:latest zig build release | |
| 26 | 37 | zmx run brew -d bash gen-brew.sh "$NEW_VERSION" | |
| 27 | 38 | ||
| 28 | 39 | echo "distributing bins" | |
| 29 | - | zmx run upload-build docker build -t zmx-upload -f Dockerfile.upload . | |
| 30 | 40 | zmx run upload docker run --rm \ | |
| 31 | - | -v "$(pwd)/README.md:/app/README.md:ro" \ | |
| 32 | - | -v "$(pwd)/logo.png:/app/logo.png:ro" \ | |
| 33 | - | -v "$(pwd)/index.tmpl:/app/index.tmpl:ro" \ | |
| 34 | 41 | -v "$(pwd)/zig-out/dist:/app/dist:ro" \ | |
| 35 | 42 | -v ~/.ssh:/root/.ssh:ro \ | |
| 36 | - | zmx-upload | |
| 43 | + | zmx-upload rsync -rv dist/ pgs.sh:/zmx/a | |
| 37 | 44 | zmx run gh-build docker build -t gh-release -f Dockerfile.release . | |
| 38 | 45 | zmx run gh docker run --rm \ | |
| 39 | 46 | -v "$(pwd)/zig-out/dist":/dist \ |