Compare commits

..

2 Commits

Author SHA1 Message Date
cb14cf9bd4 Add docs for updating josh-sync version in Nix devenv
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:38:44 +03:00
0363b0ee77 Fix VERSION not included in Nix package and Makefile bundle
- flake.nix: copy VERSION file to $out/ so josh_sync_version() finds it
- Makefile: add lib/onboard.sh to the bundle loop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:38:07 +03:00
3 changed files with 30 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ dist/josh-sync: bin/josh-sync lib/*.sh VERSION
@echo '# Generated by: make build' >> dist/josh-sync @echo '# Generated by: make build' >> dist/josh-sync
@echo '' >> dist/josh-sync @echo '' >> dist/josh-sync
@# Inline all library modules (strip shebangs and source directives) @# Inline all library modules (strip shebangs and source directives)
@for f in lib/core.sh lib/config.sh lib/auth.sh lib/state.sh lib/sync.sh; do \ @for f in lib/core.sh lib/config.sh lib/auth.sh lib/state.sh lib/sync.sh lib/onboard.sh; do \
echo "# --- $$f ---" >> dist/josh-sync; \ echo "# --- $$f ---" >> dist/josh-sync; \
grep -v '^#!/' "$$f" | grep -v '^# shellcheck source=' >> dist/josh-sync; \ grep -v '^#!/' "$$f" | grep -v '^# shellcheck source=' >> dist/josh-sync; \
echo '' >> dist/josh-sync; \ echo '' >> dist/josh-sync; \

View File

@@ -165,6 +165,34 @@ SUBREPO_SSH_KEY="-----BEGIN OPENSSH PRIVATE KEY-----
# AUTH_REPO_TOKEN=<auth-specific-token> # AUTH_REPO_TOKEN=<auth-specific-token>
``` ```
### Updating josh-sync in devenv
To update to the latest version:
```bash
devenv update josh-sync
```
Or with plain Nix flakes:
```bash
nix flake lock --update-input josh-sync
```
To pin to a specific version, use a tag ref in `devenv.yaml`:
```yaml
josh-sync:
url: git+https://your-gitea.example.com/org/josh-sync?ref=v1.1
flake: true
```
After updating, verify the version:
```bash
josh-sync --version
```
### Option B: Manual installation ### Option B: Manual installation
Install the required tools, then either: Install the required tools, then either:

View File

@@ -28,6 +28,7 @@
installPhase = '' installPhase = ''
mkdir -p $out/{bin,lib} mkdir -p $out/{bin,lib}
cp VERSION $out/
cp lib/*.sh $out/lib/ cp lib/*.sh $out/lib/
cp bin/josh-sync $out/bin/ cp bin/josh-sync $out/bin/
chmod +x $out/bin/josh-sync chmod +x $out/bin/josh-sync