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
10 changes: 10 additions & 0 deletions .changeset/fix-curl-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@enbox/gitd': patch
---

fix: install gitd through the Bun package path

The curl installer now installs the published `@enbox/gitd` package with Bun
and links wrappers into `~/.gitd/bin`. Standalone release artifacts are disabled
until gitd no longer depends on native packages that need platform-local
installation.
84 changes: 0 additions & 84 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,87 +51,3 @@ jobs:
commit: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-artifacts:
name: Build ${{ matrix.target }}
needs: release
if: needs.release.outputs.published == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: bun-linux-x64
os: linux
arch: x64
ext: tar.gz
- target: bun-linux-arm64
os: linux
arch: arm64
ext: tar.gz
- target: bun-darwin-x64
os: darwin
arch: x64
ext: tar.gz
- target: bun-darwin-arm64
os: darwin
arch: arm64
ext: tar.gz
- target: bun-windows-x64
os: windows
arch: x64
ext: zip
- target: bun-linux-x64-musl
os: linux
arch: x64-musl
ext: tar.gz
- target: bun-linux-arm64-musl
os: linux
arch: arm64-musl
ext: tar.gz

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Determine version
id: version
run: |
version=$(node -p "require('./package.json').version")
echo "version=v${version}" >> "$GITHUB_OUTPUT"

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build release binaries
run: |
mkdir -p dist/release
out_suffix=""
if [ "${{ matrix.os }}" = "windows" ]; then
out_suffix=".exe"
fi

bun build src/cli/main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/gitd${out_suffix}"
bun build src/git-remote/main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/git-remote-did${out_suffix}"
bun build src/git-remote/credential-main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/git-remote-did-credential${out_suffix}"

- name: Package artifact
run: |
artifact="gitd-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.ext }}"
if [ "${{ matrix.ext }}" = "zip" ]; then
(cd dist/release && zip -q "../../${artifact}" gitd.exe git-remote-did.exe git-remote-did-credential.exe)
else
(cd dist/release && tar -czf "../../${artifact}" gitd git-remote-did git-remote-did-credential)
fi
echo "artifact=${artifact}" >> "$GITHUB_ENV"

- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
files: ${{ env.artifact }}
80 changes: 6 additions & 74 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,80 +13,12 @@ permissions:
contents: write

jobs:
build-and-upload:
name: Build ${{ matrix.target }}
disabled:
name: Standalone artifacts disabled
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: bun-linux-x64
os: linux
arch: x64
ext: tar.gz
- target: bun-linux-arm64
os: linux
arch: arm64
ext: tar.gz
- target: bun-darwin-x64
os: darwin
arch: x64
ext: tar.gz
- target: bun-darwin-arm64
os: darwin
arch: arm64
ext: tar.gz
- target: bun-windows-x64
os: windows
arch: x64
ext: zip
- target: bun-linux-x64-musl
os: linux
arch: x64-musl
ext: tar.gz
- target: bun-linux-arm64-musl
os: linux
arch: arm64-musl
ext: tar.gz

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build release binaries
- name: Explain why artifacts are disabled
run: |
mkdir -p dist/release
out_suffix=""
if [ "${{ matrix.os }}" = "windows" ]; then
out_suffix=".exe"
fi

bun build src/cli/main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/gitd${out_suffix}"
bun build src/git-remote/main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/git-remote-did${out_suffix}"
bun build src/git-remote/credential-main.ts --compile --target "${{ matrix.target }}" --outfile "dist/release/git-remote-did-credential${out_suffix}"

- name: Package artifact
run: |
artifact="gitd-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.ext }}"
if [ "${{ matrix.ext }}" = "zip" ]; then
(cd dist/release && zip -q "../../${artifact}" gitd.exe git-remote-did.exe git-remote-did-credential.exe)
else
(cd dist/release && tar -czf "../../${artifact}" gitd git-remote-did git-remote-did-credential)
fi
echo "artifact=${artifact}" >> "$GITHUB_ENV"

- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.event.release.tag_name }}
files: ${{ env.artifact }}
echo "Standalone Bun-compiled artifacts are disabled."
echo "gitd depends on native packages that must be installed on the user's platform."
echo "Use install.sh or bun add -g @enbox/gitd until native-free artifacts are implemented."
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ gitd pr merge a1b2c3d
curl -fsSL https://gitd.sh/install | bash
```

Or via bun / npm:
The installer installs the published `@enbox/gitd` package with Bun, and
bootstraps Bun first if it is not already available.

Or install directly with Bun:

```bash
bun add -g @enbox/gitd
```

This installs three binaries:
This installs three commands:

| Binary | Purpose |
|---|---|
Expand Down
Loading
Loading