Merge ece7682dc597178758e5ed3abfac46c0b31b8ffd into 8c967299a698cf1bb9a78b879f3fde129e9691df
6 files · +68 -43
M .github/workflows/release.yml +25 -9
| @@ -4,18 +4,34 @@ on: | |||
| 4 | 4 | push: | |
| 5 | 5 | tags: ['v*'] | |
| 6 | 6 | ||
| 7 | - | # Default to no token permissions; release alone needs GitHub Release writes. | |
| 7 | + | # Default to no token permissions; release alone needs release writes. | |
| 8 | 8 | permissions: {} | |
| 9 | 9 | ||
| 10 | 10 | jobs: | |
| 11 | 11 | release: | |
| 12 | + | # Releases are published by ermite (git.bnema.dev); the GitHub mirror | |
| 13 | + | # receives the tags but must not publish a second release or AUR push. | |
| 14 | + | if: github.server_url != 'https://github.com' | |
| 15 | + | runs-on: ubuntu-latest | |
| 12 | 16 | permissions: | |
| 13 | 17 | contents: write | |
| 14 | - | # Pinned by SHA deliberately: this workflow receives the AUR key. | |
| 15 | - | # Bump the pin manually when bnema/gh-actions changes. | |
| 16 | - | uses: bnema/gh-actions/.github/workflows/go-release.yml@fcda8139e65ec45af95bc385e318351c86712d48 | |
| 17 | - | with: | |
| 18 | - | go-version-file: go.mod | |
| 19 | - | goreleaser-version: '~> v2' | |
| 20 | - | secrets: | |
| 21 | - | AUR_KEY: ${{ secrets.AUR_KEY }} | |
| 18 | + | steps: | |
| 19 | + | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| 20 | + | with: | |
| 21 | + | fetch-depth: 0 | |
| 22 | + | fetch-tags: true | |
| 23 | + | persist-credentials: false | |
| 24 | + | - name: Fetch tags | |
| 25 | + | run: git fetch --force --tags | |
| 26 | + | - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | |
| 27 | + | with: | |
| 28 | + | go-version-file: go.mod | |
| 29 | + | - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a | |
| 30 | + | with: | |
| 31 | + | distribution: goreleaser | |
| 32 | + | version: '~> v2' | |
| 33 | + | args: release --clean | |
| 34 | + | env: | |
| 35 | + | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 36 | + | # SSH key for the vev-bin AUR push. | |
| 37 | + | AUR_KEY: ${{ secrets.AUR_KEY }} | |
| @@ -4,18 +4,34 @@ on: | |||||
| 4 | push: | 4 | push: | ||
| 5 | tags: ['v*'] | 5 | tags: ['v*'] | ||
| 6 | 6 | ||||
| 7 | - | # Default to no token permissions; release alone needs GitHub Release writes. | 7 | + | # Default to no token permissions; release alone needs release writes. |
| 8 | permissions: {} | 8 | permissions: {} | ||
| 9 | 9 | ||||
| 10 | jobs: | 10 | jobs: | ||
| 11 | release: | 11 | release: | ||
| 12 | + | # Releases are published by ermite (git.bnema.dev); the GitHub mirror | |||
| 13 | + | # receives the tags but must not publish a second release or AUR push. | |||
| 14 | + | if: github.server_url != 'https://github.com' | |||
| 15 | + | runs-on: ubuntu-latest | |||
| 12 | permissions: | 16 | permissions: | ||
| 13 | contents: write | 17 | contents: write | ||
| 14 | - | # Pinned by SHA deliberately: this workflow receives the AUR key. | 18 | + | steps: |
| 15 | - | # Bump the pin manually when bnema/gh-actions changes. | 19 | + | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 |
| 16 | - | uses: bnema/gh-actions/.github/workflows/go-release.yml@fcda8139e65ec45af95bc385e318351c86712d48 | 20 | + | with: |
| 17 | - | with: | 21 | + | fetch-depth: 0 |
| 18 | - | go-version-file: go.mod | 22 | + | fetch-tags: true |
| 19 | - | goreleaser-version: '~> v2' | 23 | + | persist-credentials: false |
| 20 | - | secrets: | 24 | + | - name: Fetch tags |
| 21 | - | AUR_KEY: ${{ secrets.AUR_KEY }} | 25 | + | run: git fetch --force --tags |
| 26 | + | - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | |||
| 27 | + | with: | |||
| 28 | + | go-version-file: go.mod | |||
| 29 | + | - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a | |||
| 30 | + | with: | |||
| 31 | + | distribution: goreleaser | |||
| 32 | + | version: '~> v2' | |||
| 33 | + | args: release --clean | |||
| 34 | + | env: | |||
| 35 | + | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
| 36 | + | # SSH key for the vev-bin AUR push. | |||
| 37 | + | AUR_KEY: ${{ secrets.AUR_KEY }} | |||
M .goreleaser.yaml +13 -9
| @@ -2,6 +2,14 @@ version: 2 | |||
| 2 | 2 | ||
| 3 | 3 | project_name: vev | |
| 4 | 4 | ||
| 5 | + | # Releases are published on ermite. In CI the runner sets GITHUB_API_URL and | |
| 6 | + | # GITHUB_SERVER_URL to an address the job can reach; the public URLs are the | |
| 7 | + | # fallback for a local run. | |
| 8 | + | github_urls: | |
| 9 | + | api: '{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/' | |
| 10 | + | upload: '{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/uploads/' | |
| 11 | + | download: '{{ or (index .Env "GITHUB_SERVER_URL") "https://git.bnema.dev" }}/' | |
| 12 | + | ||
| 5 | 13 | before: | |
| 6 | 14 | hooks: | |
| 7 | 15 | - go mod tidy | |
| @@ -47,7 +55,7 @@ checksum: | |||
| 47 | 55 | ||
| 48 | 56 | changelog: | |
| 49 | 57 | sort: asc | |
| 50 | - | use: github | |
| 58 | + | use: git | |
| 51 | 59 | filters: | |
| 52 | 60 | exclude: | |
| 53 | 61 | - '^docs(\(.+\))?:' | |
| @@ -89,7 +97,7 @@ release: | |||
| 89 | 97 | ||
| 90 | 98 | ### Script (Linux x86_64/arm64, macOS arm64) | |
| 91 | 99 | ```sh | |
| 92 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/{{ .Tag }}/install.sh | VEV_VERSION={{ .Tag }} sh | |
| 100 | + | curl -fsSL https://git.bnema.dev/vev/raw/{{ .Tag }}/install.sh | VEV_VERSION={{ .Tag }} sh | |
| 93 | 101 | ``` | |
| 94 | 102 | ||
| 95 | 103 | ### Arch Linux | |
| @@ -107,19 +115,15 @@ release: | |||
| 107 | 115 | xattr -d com.apple.quarantine ~/.local/bin/vev | |
| 108 | 116 | ``` | |
| 109 | 117 | ||
| 110 | - | {{- if .PreviousTag }} | |
| 111 | - | **Full Changelog**: https://github.com/bnema/vev/compare/{{ .PreviousTag }}...{{ .Tag }} | |
| 112 | - | {{- else }} | |
| 113 | - | **Full Changelog**: https://github.com/bnema/vev/releases/tag/{{ .Tag }} | |
| 114 | - | {{- end }} | |
| 115 | - | ||
| 116 | 118 | git: | |
| 117 | 119 | tag_sort: -version:refname | |
| 118 | 120 | ||
| 119 | 121 | aurs: | |
| 120 | 122 | - name: vev-bin | |
| 121 | 123 | ids: ['default'] | |
| 122 | - | homepage: https://github.com/bnema/vev | |
| 124 | + | homepage: https://git.bnema.dev/vev | |
| 125 | + | # Public URL: github_urls.download is the CI-only relay address. | |
| 126 | + | url_template: 'https://git.bnema.dev/vev/releases/download/{{ .Tag }}/{{ .ArtifactName }}' | |
| 123 | 127 | description: Terminal multiplexer with a per-user daemon, server-side rendering, and minimal socket/SSH diffs | |
| 124 | 128 | maintainers: | |
| 125 | 129 | - bnema <b at bnema dot dev> | |
| @@ -2,6 +2,14 @@ version: 2 | |||||
| 2 | 2 | ||||
| 3 | project_name: vev | 3 | project_name: vev | ||
| 4 | 4 | ||||
| 5 | + | # Releases are published on ermite. In CI the runner sets GITHUB_API_URL and | |||
| 6 | + | # GITHUB_SERVER_URL to an address the job can reach; the public URLs are the | |||
| 7 | + | # fallback for a local run. | |||
| 8 | + | github_urls: | |||
| 9 | + | api: '{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/' | |||
| 10 | + | upload: '{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/uploads/' | |||
| 11 | + | download: '{{ or (index .Env "GITHUB_SERVER_URL") "https://git.bnema.dev" }}/' | |||
| 12 | + | ||||
| 5 | before: | 13 | before: | ||
| 6 | hooks: | 14 | hooks: | ||
| 7 | - go mod tidy | 15 | - go mod tidy | ||
| @@ -47,7 +55,7 @@ checksum: | |||||
| 47 | 55 | ||||
| 48 | changelog: | 56 | changelog: | ||
| 49 | sort: asc | 57 | sort: asc | ||
| 50 | - | use: github | 58 | + | use: git |
| 51 | filters: | 59 | filters: | ||
| 52 | exclude: | 60 | exclude: | ||
| 53 | - '^docs(\(.+\))?:' | 61 | - '^docs(\(.+\))?:' | ||
| @@ -89,7 +97,7 @@ release: | |||||
| 89 | 97 | ||||
| 90 | ### Script (Linux x86_64/arm64, macOS arm64) | 98 | ### Script (Linux x86_64/arm64, macOS arm64) | ||
| 91 | ```sh | 99 | ```sh | ||
| 92 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/{{ .Tag }}/install.sh | VEV_VERSION={{ .Tag }} sh | 100 | + | curl -fsSL https://git.bnema.dev/vev/raw/{{ .Tag }}/install.sh | VEV_VERSION={{ .Tag }} sh |
| 93 | ``` | 101 | ``` | ||
| 94 | 102 | ||||
| 95 | ### Arch Linux | 103 | ### Arch Linux | ||
| @@ -107,19 +115,15 @@ release: | |||||
| 107 | xattr -d com.apple.quarantine ~/.local/bin/vev | 115 | xattr -d com.apple.quarantine ~/.local/bin/vev | ||
| 108 | ``` | 116 | ``` | ||
| 109 | 117 | ||||
| 110 | - | {{- if .PreviousTag }} | |||
| 111 | - | **Full Changelog**: https://github.com/bnema/vev/compare/{{ .PreviousTag }}...{{ .Tag }} | |||
| 112 | - | {{- else }} | |||
| 113 | - | **Full Changelog**: https://github.com/bnema/vev/releases/tag/{{ .Tag }} | |||
| 114 | - | {{- end }} | |||
| 115 | - | ||||
| 116 | git: | 118 | git: | ||
| 117 | tag_sort: -version:refname | 119 | tag_sort: -version:refname | ||
| 118 | 120 | ||||
| 119 | aurs: | 121 | aurs: | ||
| 120 | - name: vev-bin | 122 | - name: vev-bin | ||
| 121 | ids: ['default'] | 123 | ids: ['default'] | ||
| 122 | - | homepage: https://github.com/bnema/vev | 124 | + | homepage: https://git.bnema.dev/vev |
| 125 | + | # Public URL: github_urls.download is the CI-only relay address. | |||
| 126 | + | url_template: 'https://git.bnema.dev/vev/releases/download/{{ .Tag }}/{{ .ArtifactName }}' | |||
| 123 | description: Terminal multiplexer with a per-user daemon, server-side rendering, and minimal socket/SSH diffs | 127 | description: Terminal multiplexer with a per-user daemon, server-side rendering, and minimal socket/SSH diffs | ||
| 124 | maintainers: | 128 | maintainers: | ||
| 125 | - bnema <b at bnema dot dev> | 129 | - bnema <b at bnema dot dev> | ||
M README.md +2 -2
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | <p align="center"> | |
| 4 | 4 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License: MIT"></a> | |
| 5 | - | <a href="https://github.com/bnema/vev/releases"><img src="https://img.shields.io/badge/platforms-Linux%20%7C%20macOS-blue?style=flat-square" alt="Platforms: Linux and macOS"></a> | |
| 5 | + | <a href="https://git.bnema.dev/vev/releases"><img src="https://img.shields.io/badge/platforms-Linux%20%7C%20macOS-blue?style=flat-square" alt="Platforms: Linux and macOS"></a> | |
| 6 | 6 | <a href="https://github.com/bnema/vev/commits/main"><img src="https://badgen.net/github/last-commit/bnema/vev/main?icon=github" alt="Last commit"></a> | |
| 7 | 7 | <a href="https://github.com/bnema/vev/stargazers"><img src="https://badgen.net/github/stars/bnema/vev?icon=github" alt="GitHub stars"></a> | |
| 8 | 8 | </p> | |
| @@ -37,7 +37,7 @@ Remote and hybrid need vev installed on the remote host. Use `vev host add --tra | |||
| 37 | 37 | ## Install | |
| 38 | 38 | ||
| 39 | 39 | ```sh | |
| 40 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh | |
| 40 | + | curl -fsSL https://git.bnema.dev/vev/raw/main/install.sh | sh | |
| 41 | 41 | # Arch Linux: yay -S vev-bin | |
| 42 | 42 | # or: go install github.com/bnema/vev@latest | |
| 43 | 43 | ``` | |
| @@ -2,7 +2,7 @@ | |||||
| 2 | 2 | ||||
| 3 | <p align="center"> | 3 | <p align="center"> | ||
| 4 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License: MIT"></a> | 4 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License: MIT"></a> | ||
| 5 | - | <a href="https://github.com/bnema/vev/releases"><img src="https://img.shields.io/badge/platforms-Linux%20%7C%20macOS-blue?style=flat-square" alt="Platforms: Linux and macOS"></a> | 5 | + | <a href="https://git.bnema.dev/vev/releases"><img src="https://img.shields.io/badge/platforms-Linux%20%7C%20macOS-blue?style=flat-square" alt="Platforms: Linux and macOS"></a> |
| 6 | <a href="https://github.com/bnema/vev/commits/main"><img src="https://badgen.net/github/last-commit/bnema/vev/main?icon=github" alt="Last commit"></a> | 6 | <a href="https://github.com/bnema/vev/commits/main"><img src="https://badgen.net/github/last-commit/bnema/vev/main?icon=github" alt="Last commit"></a> | ||
| 7 | <a href="https://github.com/bnema/vev/stargazers"><img src="https://badgen.net/github/stars/bnema/vev?icon=github" alt="GitHub stars"></a> | 7 | <a href="https://github.com/bnema/vev/stargazers"><img src="https://badgen.net/github/stars/bnema/vev?icon=github" alt="GitHub stars"></a> | ||
| 8 | </p> | 8 | </p> | ||
| @@ -37,7 +37,7 @@ Remote and hybrid need vev installed on the remote host. Use `vev host add --tra | |||||
| 37 | ## Install | 37 | ## Install | ||
| 38 | 38 | ||||
| 39 | ```sh | 39 | ```sh | ||
| 40 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh | 40 | + | curl -fsSL https://git.bnema.dev/vev/raw/main/install.sh | sh |
| 41 | # Arch Linux: yay -S vev-bin | 41 | # Arch Linux: yay -S vev-bin | ||
| 42 | # or: go install github.com/bnema/vev@latest | 42 | # or: go install github.com/bnema/vev@latest | ||
| 43 | ``` | 43 | ``` | ||
M RELEASING.md +22 -18
| @@ -1,21 +1,24 @@ | |||
| 1 | 1 | # Releasing vev | |
| 2 | 2 | ||
| 3 | - | Releases are cut by tagging: `git tag v0.X.Y && git push origin v0.X.Y`. | |
| 4 | - | The `release` workflow cross-compiles linux/amd64 + darwin/arm64 | |
| 5 | - | (`CGO_ENABLED=0`), publishes a GitHub Release with `checksums.txt`, and pushes | |
| 6 | - | the `vev-bin` PKGBUILD to AUR (stable tags only — `skip_upload: auto` skips | |
| 7 | - | AUR for `-rc.*`/`-alpha.*` prerelease tags). | |
| 3 | + | Releases are cut by tagging: `git tag -s v0.X.Y -m v0.X.Y && git push origin v0.X.Y`. | |
| 4 | + | `origin` is ermite (git.bnema.dev). Its `release` workflow cross-compiles | |
| 5 | + | linux/amd64, linux/arm64 and darwin/arm64 (`CGO_ENABLED=0`), publishes the | |
| 6 | + | release on git.bnema.dev with `checksums.txt`, and pushes the `vev-bin` | |
| 7 | + | PKGBUILD to AUR (stable tags only: `skip_upload: auto` skips AUR for | |
| 8 | + | `-rc.*`/`-alpha.*` prerelease tags). The GitHub mirror receives the tag but | |
| 9 | + | publishes nothing. | |
| 8 | 10 | ||
| 9 | 11 | ## Checklist | |
| 10 | 12 | ||
| 11 | - | 1. main is green on both CI legs (ubuntu, macos-14). | |
| 12 | - | 2. Tag and push. Watch: `gh run watch`. | |
| 13 | - | 3. Verify the release page: two archives + `checksums.txt` + grouped changelog. | |
| 13 | + | 1. main is green on ermite CI (`ermite run list vev`). | |
| 14 | + | 2. Tag and push. Watch: `ermite run list vev`, then `ermite run watch vev <n>`. | |
| 15 | + | 3. Verify the release: `ermite release view vev v0.X.Y` shows three archives, | |
| 16 | + | `checksums.txt` and the grouped changelog. | |
| 14 | 17 | 4. On Linux amd64, download the installer from the exact tag, inspect it, | |
| 15 | 18 | then run it for that same version: | |
| 16 | 19 | ```sh | |
| 17 | 20 | installer=$(mktemp) | |
| 18 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/v0.X.Y/install.sh -o "$installer" | |
| 21 | + | curl -fsSL https://git.bnema.dev/vev/raw/v0.X.Y/install.sh -o "$installer" | |
| 19 | 22 | less "$installer" | |
| 20 | 23 | VEV_VERSION=v0.X.Y sh "$installer" | |
| 21 | 24 | rm -f "$installer" | |
| @@ -24,24 +27,25 @@ AUR for `-rc.*`/`-alpha.*` prerelease tags). | |||
| 24 | 27 | 5. Stable tags only: confirm https://aur.archlinux.org/packages/vev-bin | |
| 25 | 28 | picked up the new version. | |
| 26 | 29 | ||
| 27 | - | ## If GitHub publishes but AUR fails | |
| 30 | + | ## If the release publishes but AUR fails | |
| 28 | 31 | ||
| 29 | - | Do **not** delete or re-push the tag. The GitHub release is the source of truth; | |
| 30 | - | only the PKGBUILD push failed (usually SSH/key). Fix the cause, then either: | |
| 32 | + | Do **not** delete or re-push the tag. The ermite release is the source of | |
| 33 | + | truth; only the PKGBUILD push failed (usually SSH/key, secret `AUR_KEY`). Fix | |
| 34 | + | the cause, then either: | |
| 31 | 35 | ||
| 32 | - | - Re-run the failed workflow job (`gh run rerun <run-id> --failed`), which | |
| 36 | + | - Re-run the failed job (`ermite run rerun vev <n> --failed`), which | |
| 33 | 37 | re-executes goreleaser idempotently for the same tag, or | |
| 34 | 38 | - For manual recovery, clone | |
| 35 | 39 | `ssh://aur@aur.archlinux.org/vev-bin.git`, update its existing PKGBUILD for | |
| 36 | - | the exact tag using that GitHub Release's `checksums.txt`, and regenerate | |
| 40 | + | the exact tag using that release's `checksums.txt`, and regenerate | |
| 37 | 41 | `.SRCINFO` with `makepkg --printsrcinfo > .SRCINFO`. Review the diff, then | |
| 38 | 42 | commit and push only the AUR repository. | |
| 39 | 43 | ||
| 40 | - | ## If AUR publishes but GitHub fails | |
| 44 | + | ## If AUR publishes but the release fails | |
| 41 | 45 | ||
| 42 | - | Do **not** delete or re-push the tag. Fix the GitHub workflow failure and rerun | |
| 43 | - | it (`gh run rerun <run-id> --failed`); if necessary, repair the GitHub Release | |
| 44 | - | manually with the same tag's archives and `checksums.txt`, then verify both | |
| 46 | + | Do **not** delete or re-push the tag. Fix the workflow failure and rerun it | |
| 47 | + | (`ermite run rerun vev <n> --failed`); if necessary, repair the release with | |
| 48 | + | `ermite release upload vev v0.X.Y <files> --clobber`, then verify both | |
| 45 | 49 | publication targets before proceeding. | |
| 46 | 50 | ||
| 47 | 51 | ## Version stamping | |
| @@ -1,21 +1,24 @@ | |||||
| 1 | # Releasing vev | 1 | # Releasing vev | ||
| 2 | 2 | ||||
| 3 | - | Releases are cut by tagging: `git tag v0.X.Y && git push origin v0.X.Y`. | 3 | + | Releases are cut by tagging: `git tag -s v0.X.Y -m v0.X.Y && git push origin v0.X.Y`. |
| 4 | - | The `release` workflow cross-compiles linux/amd64 + darwin/arm64 | 4 | + | `origin` is ermite (git.bnema.dev). Its `release` workflow cross-compiles |
| 5 | - | (`CGO_ENABLED=0`), publishes a GitHub Release with `checksums.txt`, and pushes | 5 | + | linux/amd64, linux/arm64 and darwin/arm64 (`CGO_ENABLED=0`), publishes the |
| 6 | - | the `vev-bin` PKGBUILD to AUR (stable tags only — `skip_upload: auto` skips | 6 | + | release on git.bnema.dev with `checksums.txt`, and pushes the `vev-bin` |
| 7 | - | AUR for `-rc.*`/`-alpha.*` prerelease tags). | 7 | + | PKGBUILD to AUR (stable tags only: `skip_upload: auto` skips AUR for |
| 8 | + | `-rc.*`/`-alpha.*` prerelease tags). The GitHub mirror receives the tag but | |||
| 9 | + | publishes nothing. | |||
| 8 | 10 | ||||
| 9 | ## Checklist | 11 | ## Checklist | ||
| 10 | 12 | ||||
| 11 | - | 1. main is green on both CI legs (ubuntu, macos-14). | 13 | + | 1. main is green on ermite CI (`ermite run list vev`). |
| 12 | - | 2. Tag and push. Watch: `gh run watch`. | 14 | + | 2. Tag and push. Watch: `ermite run list vev`, then `ermite run watch vev <n>`. |
| 13 | - | 3. Verify the release page: two archives + `checksums.txt` + grouped changelog. | 15 | + | 3. Verify the release: `ermite release view vev v0.X.Y` shows three archives, |
| 16 | + | `checksums.txt` and the grouped changelog. | |||
| 14 | 4. On Linux amd64, download the installer from the exact tag, inspect it, | 17 | 4. On Linux amd64, download the installer from the exact tag, inspect it, | ||
| 15 | then run it for that same version: | 18 | then run it for that same version: | ||
| 16 | ```sh | 19 | ```sh | ||
| 17 | installer=$(mktemp) | 20 | installer=$(mktemp) | ||
| 18 | - | curl -fsSL https://raw.githubusercontent.com/bnema/vev/v0.X.Y/install.sh -o "$installer" | 21 | + | curl -fsSL https://git.bnema.dev/vev/raw/v0.X.Y/install.sh -o "$installer" |
| 19 | less "$installer" | 22 | less "$installer" | ||
| 20 | VEV_VERSION=v0.X.Y sh "$installer" | 23 | VEV_VERSION=v0.X.Y sh "$installer" | ||
| 21 | rm -f "$installer" | 24 | rm -f "$installer" | ||
| @@ -24,24 +27,25 @@ AUR for `-rc.*`/`-alpha.*` prerelease tags). | |||||
| 24 | 5. Stable tags only: confirm https://aur.archlinux.org/packages/vev-bin | 27 | 5. Stable tags only: confirm https://aur.archlinux.org/packages/vev-bin | ||
| 25 | picked up the new version. | 28 | picked up the new version. | ||
| 26 | 29 | ||||
| 27 | - | ## If GitHub publishes but AUR fails | 30 | + | ## If the release publishes but AUR fails |
| 28 | 31 | ||||
| 29 | - | Do **not** delete or re-push the tag. The GitHub release is the source of truth; | 32 | + | Do **not** delete or re-push the tag. The ermite release is the source of |
| 30 | - | only the PKGBUILD push failed (usually SSH/key). Fix the cause, then either: | 33 | + | truth; only the PKGBUILD push failed (usually SSH/key, secret `AUR_KEY`). Fix |
| 34 | + | the cause, then either: | |||
| 31 | 35 | ||||
| 32 | - | - Re-run the failed workflow job (`gh run rerun <run-id> --failed`), which | 36 | + | - Re-run the failed job (`ermite run rerun vev <n> --failed`), which |
| 33 | re-executes goreleaser idempotently for the same tag, or | 37 | re-executes goreleaser idempotently for the same tag, or | ||
| 34 | - For manual recovery, clone | 38 | - For manual recovery, clone | ||
| 35 | `ssh://aur@aur.archlinux.org/vev-bin.git`, update its existing PKGBUILD for | 39 | `ssh://aur@aur.archlinux.org/vev-bin.git`, update its existing PKGBUILD for | ||
| 36 | - | the exact tag using that GitHub Release's `checksums.txt`, and regenerate | 40 | + | the exact tag using that release's `checksums.txt`, and regenerate |
| 37 | `.SRCINFO` with `makepkg --printsrcinfo > .SRCINFO`. Review the diff, then | 41 | `.SRCINFO` with `makepkg --printsrcinfo > .SRCINFO`. Review the diff, then | ||
| 38 | commit and push only the AUR repository. | 42 | commit and push only the AUR repository. | ||
| 39 | 43 | ||||
| 40 | - | ## If AUR publishes but GitHub fails | 44 | + | ## If AUR publishes but the release fails |
| 41 | 45 | ||||
| 42 | - | Do **not** delete or re-push the tag. Fix the GitHub workflow failure and rerun | 46 | + | Do **not** delete or re-push the tag. Fix the workflow failure and rerun it |
| 43 | - | it (`gh run rerun <run-id> --failed`); if necessary, repair the GitHub Release | 47 | + | (`ermite run rerun vev <n> --failed`); if necessary, repair the release with |
| 44 | - | manually with the same tag's archives and `checksums.txt`, then verify both | 48 | + | `ermite release upload vev v0.X.Y <files> --clobber`, then verify both |
| 45 | publication targets before proceeding. | 49 | publication targets before proceeding. | ||
| 46 | 50 | ||||
| 47 | ## Version stamping | 51 | ## Version stamping | ||
M install.sh +5 -4
| @@ -1,9 +1,10 @@ | |||
| 1 | 1 | #!/bin/sh | |
| 2 | 2 | # vev installer — Linux x86_64/arm64 and macOS arm64. | |
| 3 | - | # Usage: curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh | |
| 3 | + | # Usage: curl -fsSL https://git.bnema.dev/vev/raw/main/install.sh | sh | |
| 4 | 4 | # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release). | |
| 5 | 5 | set -eu | |
| 6 | 6 | ||
| 7 | + | FORGE="https://git.bnema.dev" | |
| 7 | 8 | REPO="bnema/vev" | |
| 8 | 9 | VERSION="${VEV_VERSION:-latest}" | |
| 9 | 10 | ||
| @@ -29,8 +30,8 @@ fi | |||
| 29 | 30 | ||
| 30 | 31 | # --- Resolve version ------------------------------------------------------- | |
| 31 | 32 | if [ "$VERSION" = "latest" ]; then | |
| 32 | - | VERSION="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" \ | |
| 33 | - | | grep '"tag_name"' | head -1 | cut -d '"' -f 4)" | |
| 33 | + | VERSION="$(curl -fsSL "${FORGE}/-/github/api/repos/${REPO}/releases/latest" \ | |
| 34 | + | | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)" | |
| 34 | 35 | [ -n "$VERSION" ] || err "could not resolve the latest release tag" | |
| 35 | 36 | fi | |
| 36 | 37 | info "installing vev ${VERSION} (${OS}/${ARCH}) to ${INSTALL_DIR}" | |
| @@ -39,7 +40,7 @@ info "installing vev ${VERSION} (${OS}/${ARCH}) to ${INSTALL_DIR}" | |||
| 39 | 40 | TMP_DIR="$(mktemp -d)" | |
| 40 | 41 | trap 'rm -rf "$TMP_DIR"' EXIT | |
| 41 | 42 | ||
| 42 | - | BASE_URL="https://github.com/${REPO}/releases/download/${VERSION}" | |
| 43 | + | BASE_URL="${FORGE}/vev/releases/download/${VERSION}" | |
| 43 | 44 | curl -fsSL -o "$TMP_DIR/$TARBALL" "$BASE_URL/$TARBALL" \ | |
| 44 | 45 | || err "download failed: $BASE_URL/$TARBALL" | |
| 45 | 46 | curl -fsSL -o "$TMP_DIR/checksums.txt" "$BASE_URL/checksums.txt" \ | |
| @@ -1,9 +1,10 @@ | |||||
| 1 | #!/bin/sh | 1 | #!/bin/sh | ||
| 2 | # vev installer — Linux x86_64/arm64 and macOS arm64. | 2 | # vev installer — Linux x86_64/arm64 and macOS arm64. | ||
| 3 | - | # Usage: curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh | 3 | + | # Usage: curl -fsSL https://git.bnema.dev/vev/raw/main/install.sh | sh |
| 4 | # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release). | 4 | # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release). | ||
| 5 | set -eu | 5 | set -eu | ||
| 6 | 6 | ||||
| 7 | + | FORGE="https://git.bnema.dev" | |||
| 7 | REPO="bnema/vev" | 8 | REPO="bnema/vev" | ||
| 8 | VERSION="${VEV_VERSION:-latest}" | 9 | VERSION="${VEV_VERSION:-latest}" | ||
| 9 | 10 | ||||
| @@ -29,8 +30,8 @@ fi | |||||
| 29 | 30 | ||||
| 30 | # --- Resolve version ------------------------------------------------------- | 31 | # --- Resolve version ------------------------------------------------------- | ||
| 31 | if [ "$VERSION" = "latest" ]; then | 32 | if [ "$VERSION" = "latest" ]; then | ||
| 32 | - | VERSION="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" \ | 33 | + | VERSION="$(curl -fsSL "${FORGE}/-/github/api/repos/${REPO}/releases/latest" \ |
| 33 | - | | grep '"tag_name"' | head -1 | cut -d '"' -f 4)" | 34 | + | | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)" |
| 34 | [ -n "$VERSION" ] || err "could not resolve the latest release tag" | 35 | [ -n "$VERSION" ] || err "could not resolve the latest release tag" | ||
| 35 | fi | 36 | fi | ||
| 36 | info "installing vev ${VERSION} (${OS}/${ARCH}) to ${INSTALL_DIR}" | 37 | info "installing vev ${VERSION} (${OS}/${ARCH}) to ${INSTALL_DIR}" | ||
| @@ -39,7 +40,7 @@ info "installing vev ${VERSION} (${OS}/${ARCH}) to ${INSTALL_DIR}" | |||||
| 39 | TMP_DIR="$(mktemp -d)" | 40 | TMP_DIR="$(mktemp -d)" | ||
| 40 | trap 'rm -rf "$TMP_DIR"' EXIT | 41 | trap 'rm -rf "$TMP_DIR"' EXIT | ||
| 41 | 42 | ||||
| 42 | - | BASE_URL="https://github.com/${REPO}/releases/download/${VERSION}" | 43 | + | BASE_URL="${FORGE}/vev/releases/download/${VERSION}" |
| 43 | curl -fsSL -o "$TMP_DIR/$TARBALL" "$BASE_URL/$TARBALL" \ | 44 | curl -fsSL -o "$TMP_DIR/$TARBALL" "$BASE_URL/$TARBALL" \ | ||
| 44 | || err "download failed: $BASE_URL/$TARBALL" | 45 | || err "download failed: $BASE_URL/$TARBALL" | ||
| 45 | curl -fsSL -o "$TMP_DIR/checksums.txt" "$BASE_URL/checksums.txt" \ | 46 | curl -fsSL -o "$TMP_DIR/checksums.txt" "$BASE_URL/checksums.txt" \ | ||
M scripts/install_platform_test.sh +1 -1
| @@ -43,7 +43,7 @@ assert_mapping() { | |||
| 43 | 43 | fail "$os/$arch unexpectedly completed installation" | |
| 44 | 44 | fi | |
| 45 | 45 | ||
| 46 | - | expected_url="https://github.com/bnema/vev/releases/download/v0.0.0/$tarball" | |
| 46 | + | expected_url="https://git.bnema.dev/vev/releases/download/v0.0.0/$tarball" | |
| 47 | 47 | [ -f "$curl_log" ] || fail "$os/$arch did not attempt a download" | |
| 48 | 48 | grep -F "$expected_url" "$curl_log" >/dev/null \ | |
| 49 | 49 | || fail "$os/$arch did not select $tarball" | |
| @@ -43,7 +43,7 @@ assert_mapping() { | |||||
| 43 | fail "$os/$arch unexpectedly completed installation" | 43 | fail "$os/$arch unexpectedly completed installation" | ||
| 44 | fi | 44 | fi | ||
| 45 | 45 | ||||
| 46 | - | expected_url="https://github.com/bnema/vev/releases/download/v0.0.0/$tarball" | 46 | + | expected_url="https://git.bnema.dev/vev/releases/download/v0.0.0/$tarball" |
| 47 | [ -f "$curl_log" ] || fail "$os/$arch did not attempt a download" | 47 | [ -f "$curl_log" ] || fail "$os/$arch did not attempt a download" | ||
| 48 | grep -F "$expected_url" "$curl_log" >/dev/null \ | 48 | grep -F "$expected_url" "$curl_log" >/dev/null \ | ||
| 49 | || fail "$os/$arch did not select $tarball" | 49 | || fail "$os/$arch did not select $tarball" | ||