From 55ad2f4bc3e54a8246fe746d5f5b1eceb8d8efc8 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 12 Dec 2024 15:34:56 -1000 Subject: [PATCH] ;doc: ghrelnotes: cleanups; leave platforms expanded for now --- doc/ghrelnotes | 131 +++++++++++++++++++++++++--------------------- tools/getrelnotes | 6 --- 2 files changed, 70 insertions(+), 67 deletions(-) delete mode 100755 tools/getrelnotes diff --git a/doc/ghrelnotes b/doc/ghrelnotes index 2dc19ca62..bb0f09777 100755 --- a/doc/ghrelnotes +++ b/doc/ghrelnotes @@ -2,6 +2,7 @@ # ghrelnotes REL - generate github release notes for REL. -*- markdown -*- cd "$(dirname $0)" + cat <<'END'
@@ -12,8 +13,11 @@ cat <<'END' END + export REL=$1 -../tools/getrelnotes $REL +# extract REL notes from relnotes.md +awk "/^## .*-${REL//./'\.'}$/{p=1;next} /^## /{p=0} p" relnotes.md + envsubst '$REL' <<'END'
@@ -24,110 +28,115 @@ envsubst '$REL' <<'END' -This release may arrive in your local packaging system soon - look for green badges at [hledger.org: Install](https://hledger.org/install.html). -Or you can [build it from source](https://hledger.org/install.html#build-from-source), as described on that page. -Or you can use the binaries below: + +For all install options, see [hledger.org: Install](https://hledger.org/install). +You can install hledger from most package managers (but check for a green badge indicating it's up to date). +Or you can build it from source yourself. + +Or you can install up to date binaries from this page, by following the appropriate instructions below. +If you find problems with these instructions, please [let us know](https://hledger.org/support). + + -
+ -### GNU/Linux on 64-bit Intel +### GNU/Linux, 64-bit Intel -At the command line, +At the command line: ``` cd /usr/local/bin curl -LOC- https://github.com/simonmichael/hledger/releases/download/$REL/hledger-linux-x64.zip (unzip -p hledger-linux-x64.zip | tar xf -) && rm hledger-linux-x64.zip cd -hledger --version # should show $REL +hledger --version; hledger-ui --version; hledger-web --version # should show $REL ``` -
-
+ + -### Mac on 64-bit ARM or Intel +### Mac, 64-bit ARM or Intel -In a terminal window, run these commands to download, unpack, authorise, and install the binaries in your command line PATH. -Note, don't use your web browser; it won't authorise the binaries. +In a terminal window (don't use your web browser to download, it won't authorise the binaries): -``` -cd /usr/local/bin +- For ARM macs: + ``` + cd /usr/local/bin + curl -LOC- https://github.com/simonmichael/hledger/releases/download/$REL/hledger-mac-arm64.zip + (unzip -p hledger-mac-arm64.zip | tar xf -) && rm hledger-mac-arm64.zip + cd + hledger --version; hledger-ui --version; hledger-web --version # should show $REL + ``` -# for ARM macs: -curl -LOC- https://github.com/simonmichael/hledger/releases/download/$REL/hledger-mac-arm64.zip -(unzip -p hledger-mac-arm64.zip | tar xf -) && rm hledger-mac-arm64.zip +- For Intel macs: + ``` + cd /usr/local/bin + curl -LOC- https://github.com/simonmichael/hledger/releases/download/$REL/hledger-mac-x64.tar.gz + (unzip -p hledger-mac-x64.tar.gz | tar xf -) && rm -f hledger-mac-x64.zip + cd + hledger --version; hledger-ui --version; hledger-web --version # should show $REL + ``` -# or for Intel macs: -curl -LOC- https://github.com/simonmichael/hledger/releases/download/$REL/hledger-mac-x64.tar.gz -(unzip -p hledger-mac-x64.tar.gz | tar xf -) && rm -f hledger-mac-x64.zip -cd -hledger --version # should show $REL -``` - -
-
+ + -### Windows on 64-bit Intel or ARM +### Windows, 64-bit ARM or Intel -In a powershell window (press Windows-r, type powershell, press enter), +In a powershell window (press `WINDOWS-R`, `powershell`, `ENTER`): -1. Make a place to keep hledger binaries, and add it to your PATH; this makes running hledger easier. You only need to do this once, not for every release: -``` -mkdir -force $HOME\bin >$null -$ENV:PATH += ";"+$HOME+"\bin" -[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User) -``` +1. Make a place to keep installed binaries. You only need to do this once, not for every release: + ``` + mkdir -force $HOME\bin >$null + $ENV:PATH += ";"+$HOME+"\bin" + [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User) + ``` 2. Download and install the release binaries: -``` -cd $HOME\bin -cp hledger.exe hledger.old.exe # keep a backup of the old executables, if you like -cp hledger-ui.exe hledger-ui.old.exe -cp hledger-web.exe hledger-web.old.exe -curl https://github.com/simonmichael/hledger/releases/download/$REL/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip -Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force -cd $HOME -hledger --version # should show $REL -hledger-ui --version -hledger-web --version -``` + ``` + cd $HOME\bin + curl https://github.com/simonmichael/hledger/releases/download/$REL/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip + Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force + cd $HOME + hledger --version; hledger-ui --version; hledger-web --version # should show $REL + ``` 3. Ensure a default journal file exists, and without a problematic encoding. -(Not sure why "ascii" is needed here - hledger likes utf8 and understands utf8 BOM headers.. -but the state of [our unicode support on Windows](https://github.com/simonmichael/hledger/issues?q=is%3Aissue+label%3A%22platform%3A+windows%22+label%3Ai18n) -is really unknown, your input welcome.) -``` -out-file -append -encoding ascii $HOME/.hledger.journal -``` +This will allow you to start hledger-web by double-clicking on its icon if you wish. + ``` + out-file -append -encoding ascii $HOME/.hledger.journal + ``` + (I'm not sure why "ascii" is needed here - hledger likes utf8 and understands utf8 BOM headers, + but the state of [our unicode support on Windows](https://github.com/simonmichael/hledger/issues?q=is%3Aissue+label%3A%22platform%3A+windows%22+label%3Ai18n) + is really unknown, your feedback is welcome.) -Once that journal file exists, you can start hledger-web by double-clicking on the icon if you wish. - -
-
+ + -### Windows 7 on 64-bit Intel +### Windows 7, 64-bit Intel +These instructions have not been tested recently, please [let us know](https://hledger.org/support) if they work for you: + - click hledger-windows-x64.zip below - choose Open with Windows Explorer, OK - click Extract all files @@ -138,7 +147,7 @@ Once that journal file exists, you can start hledger-web by double-clicking on t - for each icon: double-click, uncheck "Always ask before opening this file", click Run - close those Explorer windows - open a command window (press Windows-r, type CMD, press enter) -- `hledger --version` should show $REL +- `hledger --version; hledger-ui --version; hledger-web --version` should show $REL - `echo # >> .hledger.journal` to ensure a default journal file exists. (Important: the doubled **>>** is needed to avoid overwriting existing data.) Problems: @@ -147,9 +156,9 @@ Problems: configure that to be larger, or run hledger-web from a command window instead. - hledger or hledger-web may fail to run if there is not enough memory available. -
+ -\ +### Next steps Once installed, run `hledger`, and perhaps read [hledger.org: Quick start](https://hledger.org/#quick-start). diff --git a/tools/getrelnotes b/tools/getrelnotes deleted file mode 100755 index f6f446213..000000000 --- a/tools/getrelnotes +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# getrelnotes REL - extract the release notes for REL from relnotes.md. -# The main release heading is omitted. - -cd "$(dirname $0)" -awk "/^## .*-${1//./'\.'}$/{p=1;next} /^## /{p=0} p" ../doc/relnotes.md