use stderr for errors, and expose os,arch,format release info upstream
[webi-installers/.git] / README.md
index f3bf04d10a5494bac324a938eca098a8532230fa..f83b77647e55d7fab5ddddf5f030ac9a4d49d859 100644 (file)
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ An install consists of 5 parts in 4 files:
 
 ```
 my-new-package/
-  - package.yash
+  - README.md (package info in frontmatter)
   - releases.js
   - install.sh
   - install.bat
@@ -105,27 +105,22 @@ node _webi/test.js ./new-package/
 
 Just copy the format from any of the existing packages. It's like this:
 
-`package.yash`:
+`README.md`:
 
-````
-# title: Node.js
-# homepage: https://nodejs.org
-# tagline: JavaScript V8 runtime
-# description: |
-#   Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine
-# examples: |
-#   ```bash
-#   node -e 'console.log("Hello, World!")'
-#   > Hello, World!
-#   ```
-
-END
-````
-
-This is a dumb format. We know. Historical accident (originally these were in
-bash comments).
+````md
+---
+title: Node.js
+homepage: https://nodejs.org
+tagline: JavaScript V8 runtime
+description: |
+  Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine
+---
 
-It's in the TODOs to replace this with either YAML or Markdown.
+```bash
+node -e 'console.log("Hello, World!")'
+> Hello, World!
+```
+````
 
 ### 1. Fetch Releases
 
@@ -164,13 +159,13 @@ pkg_cmd_name="foobar"
 
 # These are used for symlinks, PATH, and test commands
 pkg_dst="$HOME/.local/opt/foobar"
-pkg_dst_bin="$HOME/.local/opt/foobar/bin"
 pkg_dst_cmd="$HOME/.local/opt/foobar/bin/foobar"
+#pkg_dst_bin="$(dirname "$pkg_dst_cmd")"
 
 # These are the _real_ locations for the above
 pkg_src="$HOME/.local/opt/foobar-v$WEBI_VERSION"
-pkg_src_bin="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin"
 pkg_src_cmd="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin/foobar"
+#pkg_src_bin="$(dirname "$pkg_src_cmd")"
 ```
 
 (required) A version check function that strips all non-version junk
@@ -211,9 +206,8 @@ See `webi/template.sh`
 
 These variables will be set by the server:
 
-```
+```bash
 WEBI_PKG=example@v1
-WEBI_NAME=example
 WEBI_TAG=v1
 WEBI_HOST=https://webinstall.dev
 WEBI_RELEASES=https://webinstall.dev/api/releases/example@v1?os=macos&arch=amd64&pretty=true
@@ -229,6 +223,13 @@ WEBI_PKG_URL=https://cdn.example.com/example-macos-amd64.tar.gz
 WEBI_PKG_FILE=example-macos-amd64.tar.gz
 ```
 
+```bash
+PKG_NAME=example
+PKG_OSES=macos,linux,windows
+PKG_ARCHES=amd64,arm64,x86
+PKG_FORMATS=zip,xz
+```
+
 ```bash
 WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-foobar.XXXXXXXX)"}
 WEBI_SINGLE=""