Skip to content

Commit 2e966d5

Browse files
committed
README: local build steps
1 parent 92b4500 commit 2e966d5

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,36 @@ node --enable-source-maps ./dist/js/index.js
166166

167167
## Build single-file executable
168168

169+
Test local source before publishing by compiling to same single-file executable
170+
the release flow publishes. Create `git-stack` symlink and prepend to `PATH` so
171+
`git stack` finds it first, even over any existing installation, e.g. Homebrew.
172+
173+
> https://bun.com/docs/bundler/executables#supported-targets
174+
169175
```bash
170-
pnpm run compile
176+
# mac arm
177+
pnpm run compile -- --target=bun-darwin-arm64
178+
ln -sf "$PWD/dist/bin/git-stack-bun-darwin-arm64" "$PWD/dist/bin/git-stack"
179+
export PATH="$PWD/dist/bin:$PATH"
180+
rehash
181+
```
182+
183+
```bash
184+
185+
```
171186

172-
./dist/js/with-sourcemaps/git-stack-bun-darwin-arm64 --no-sync
187+
Verify the local binary is first on `PATH`
188+
189+
```bash
190+
command -v git-stack # should print `dist/bin/git-stack` path
191+
type -a git-stack # should list path above first before any others
192+
git stack --version # should print local version
193+
```
194+
195+
To persist local override, prepend to `PATH` in your shell rc
196+
197+
```bash
198+
export PATH="/Users/noah/code/git-stack-cli/dist/bin:$PATH"
173199
```
174200

175201
## Publishing

0 commit comments

Comments
 (0)