summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-08-13 10:23:03 +0300
committerLars Wirzenius <liw@liw.fi>2023-08-13 12:24:07 +0300
commitb62fca3ec660907d2c5517a06b1be4e5067261b8 (patch)
treedd231c7ff3498910548b6169256e76cf2cc7c8d0
parent2adc2bd0b5cca01e1a0883a956fe607fc8d4d675 (diff)
downloadv-i-b62fca3ec660907d2c5517a06b1be4e5067261b8.tar.gz
chore: add helper script to publish release artifacts
Sponsored-by: author
-rwxr-xr-xpublish-release.sh17
-rw-r--r--tutorial.md17
2 files changed, 25 insertions, 9 deletions
diff --git a/publish-release.sh b/publish-release.sh
new file mode 100755
index 0000000..741b17b
--- /dev/null
+++ b/publish-release.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -euo pipefail
+
+img="$1"
+dir="$2"
+
+version="$(basename "$dir")"
+
+mkdir "$dir"
+xz -0vT0 <"$img" >"$dir/v-i.img.xz"
+cp configure-installer write-and-config.sh "$dir/"
+for file in NEWS.md README.md tutorial.md; do
+ sed "s/VERSION/$version/" "$file" >tmp.md
+ pandoc tmp.md -o "$dir/$(basename "$file" .md).html"
+ rm tmp.md
+done
diff --git a/tutorial.md b/tutorial.md
index c8e48e0..5ba8ce4 100644
--- a/tutorial.md
+++ b/tutorial.md
@@ -8,14 +8,13 @@ You need:
The steps:
-1. Download the installer image from
- <https://files.liw.fi/v-i/v-i.img.xz>. You can use `curl` or `wget`
- or your web browser. Use **one of** the following commands:
-
- ~~~sh
- curl https://files.liw.fi/v-i/v-i.img.xz > v-i.img.xz
- wget -c https://files.liw.fi/v-i/v-i.img.xz
- ~~~
+1. Download the installer image (`v-i.img.xz`) and related scripts
+ (`configure-installer` and `write-and-config.sh`) from a
+ subdirectory or <https://files.liw.fi/v-i/>.
+
+ * <https://files.liw.fi/v-i/VERSION/v-i.img.xz>
+ * <https://files.liw.fi/v-i/VERSION/configure-installer>
+ * <https://files.liw.fi/v-i/VERSION/write-and-config.sh>
2. Unpack the downloaded image.
@@ -49,7 +48,7 @@ The steps:
5. Write the installer image to the USB drive, and configure it.
~~~sh
- sudo ./write-and-config.sh config.yaml /dev/sdx v-i.img
+ sudo bash write-and-config.sh config.yaml /dev/sdx v-i.img
~~~
This will take a few minutes.