diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29dfb8f..d730863 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,8 +66,9 @@ jobs: - name: Prepare binary for DALEC run: | - mkdir -p src/src + mkdir -p src/src/man cp spry src/src/spry + cp man/spry.1 src/src/man/spry.1 chmod +x src/src/spry echo "✅ Binary prepared in src/src/ directory." diff --git a/Makefile b/Makefile index 188e067..74b78ed 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,6 @@ build-windows: download-deps ## Build Windows package (native Deno compilation) @echo "Compiling spry for Windows..." deno compile \ --allow-all \ - --import-map=import_map.json \ --target x86_64-pc-windows-msvc \ --output=spry.exe \ spry.ts @@ -60,7 +59,6 @@ compile-local: download-deps ## Compile spry locally with Deno echo "Compiling spry..."; \ deno compile \ --allow-all \ - --import-map=import_map.json \ --output=spry \ spry.ts; \ echo "✅ Done! Binary created: ./spry"; \ @@ -70,8 +68,9 @@ compile-local: download-deps ## Compile spry locally with Deno prepare-src: compile-local ## Prepare src directory for DALEC @echo "Preparing src directory for DALEC..." - @mkdir -p src/src + @mkdir -p src/src/man @cp spry src/src/spry + @cp man/spry.1 src/src/man/spry.1 @chmod +x src/src/spry @echo "✅ Binary prepared in src/src/ directory" @@ -92,10 +91,18 @@ install: ## Install spry locally (requires sudo) @echo "Installing spry to /usr/local/bin..." sudo cp spry /usr/local/bin/spry sudo chmod +x /usr/local/bin/spry + @echo "Installing man page..." + sudo mkdir -p /usr/local/share/man/man1 + sudo cp man/spry.1 /usr/local/share/man/man1/spry.1 + @echo "Updating man database..." + sudo mandb @echo "Installation complete. Run 'spry --help' to verify." uninstall: ## Uninstall spry from system @echo "Uninstalling spry..." sudo rm -f /usr/local/bin/spry + sudo rm -f /usr/local/share/man/man1/spry.1 + @echo "Updating man database..." + sudo mandb @echo "Uninstall complete." diff --git a/dalec-spry.yaml b/dalec-spry.yaml index b4bbc27..f67ffdc 100644 --- a/dalec-spry.yaml +++ b/dalec-spry.yaml @@ -34,6 +34,9 @@ build: cp -p src/src/src/spry ./spry chmod +x spry + # Handle man page + cp src/src/src/man/spry.1 ./spry.1 + # Verify the binary works before packaging file ./spry ls -lh ./spry @@ -41,6 +44,8 @@ build: artifacts: binaries: spry: + manpages: + spry.1: tests: - name: Check spry binary exists @@ -52,13 +57,12 @@ tests: - command: test -x /usr/bin/spry targets: - jammy: # Ubuntu 22.04 DEB + jammy: # Ubuntu 22.04 DEB dependencies: runtime: ca-certificates: - bookworm: # Debian 12 DEB + bookworm: # Debian 12 DEB dependencies: runtime: ca-certificates: - windowscross: # Windows cross-compilation - + windowscross: # Windows cross-compilation diff --git a/man/spry.1 b/man/spry.1 new file mode 100644 index 0000000..a38c2b0 --- /dev/null +++ b/man/spry.1 @@ -0,0 +1,30 @@ +.TH SPRY 1 "December 2025" "0.106.0" "Spry Manual" +.SH NAME +spry \- Spry CLI - A declarative web application framework +.SH SYNOPSIS +.B spry +[\fIOPTIONS\fR] [\fICOMMAND\fR] +.SH DESCRIPTION +Spry CLI is a command-line interface for managing Spry applications. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Show this help message and exit. +.TP +.BR \-V ", " \-\-version +Show the version number. +.SH COMMANDS +.TP +.B axiom +Spry Axiom Explorer CLI. +.TP +.B rb +Spry Runbook operator. +.TP +.B sp +Spry SQLPage Playbook operator. +.TP +.B completions +Generate shell completions. +.SH AUTHOR +Spry Team diff --git a/scripts/release.sh b/scripts/release.sh index bb29bbd..0c48c4c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -48,9 +48,16 @@ sed -i.bak -E "s|/v[0-9]+\.[0-9]+\.[0-9]+/|/v$VERSION/|g" DEPLOYMENT.md sed -i.bak -E "s|_[0-9]+\.[0-9]+\.[0-9]+-|_${VERSION}-|g" DEPLOYMENT.md rm -f DEPLOYMENT.md.bak +# Update version and date in man/spry.1 header +echo "Updating version and date in man/spry.1..." +CURRENT_DATE=$(date +"%B %Y") +# Update header line: .TH SPRY 1 "Date" "Version" "Manual Name" +sed -i.bak -E "s/^(\.TH SPRY 1 \")[^\"]+(\" \")[^\"]+(\".*)$/\1$CURRENT_DATE\2$VERSION\3/" man/spry.1 +rm -f man/spry.1.bak + # Commit changes echo "Committing version changes..." -git add dalec-spry.yaml spry.ts README.md QUICKSTART.md DEPLOYMENT.md +git add dalec-spry.yaml spry.ts README.md QUICKSTART.md DEPLOYMENT.md man/spry.1 git commit -m "Release v$VERSION" || echo "No changes to commit" git push origin main diff --git a/spry.ts b/spry.ts index e1190f9..31e637b 100755 --- a/spry.ts +++ b/spry.ts @@ -1,6 +1,7 @@ #!/usr/bin/env -S deno run -A --node-modules-dir=auto // Use `deno run -A --watch` in the shebang if you're contributing / developing Spry itself. +// import { CLI } from "https://raw.githubusercontent.com/sijucj/spry_private/refs/tags/v0.106.0/bin/spry.ts"; import { CLI } from "https://raw.githubusercontent.com/programmablemd/spry/refs/tags/v0.106.0/bin/spry.ts"; await CLI({ defaultFiles: ["Spryfile.md"] }).parse(Deno.args); diff --git a/src/src/man/spry.1 b/src/src/man/spry.1 new file mode 100644 index 0000000..163f3b3 --- /dev/null +++ b/src/src/man/spry.1 @@ -0,0 +1,30 @@ +.TH SPRY 1 "December 2025" "0.102.1" "Spry Manual" +.SH NAME +spry \- Spry CLI - A declarative web application framework +.SH SYNOPSIS +.B spry +[\fIOPTIONS\fR] [\fICOMMAND\fR] +.SH DESCRIPTION +Spry CLI is a command-line interface for managing Spry applications. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Show this help message and exit. +.TP +.BR \-V ", " \-\-version +Show the version number. +.SH COMMANDS +.TP +.B axiom +Spry Axiom Explorer CLI. +.TP +.B rb +Spry Runbook operator. +.TP +.B sp +Spry SQLPage Playbook operator. +.TP +.B completions +Generate shell completions. +.SH AUTHOR +Spry Team