diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 8e7e54ac2..c12eb2032 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -13,6 +13,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install jq + run: sudo apt-get install -y jq + - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/manual/book.toml b/manual/book.toml index cac3d9f73..2c79be66b 100644 --- a/manual/book.toml +++ b/manual/book.toml @@ -15,3 +15,6 @@ git-repository-url = "https://github.com/wilfred/difftastic" [output.html.playground] copyable = false + +[preprocessor.replace-version-placeholder] +command = "./replace_version_placeholder.sh" diff --git a/manual/replace_version_placeholder.sh b/manual/replace_version_placeholder.sh new file mode 100755 index 000000000..022bc5e22 --- /dev/null +++ b/manual/replace_version_placeholder.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +DFT_VERSION=$(cargo read-manifest | jq -r .version) + +jq .[1] | jq '.sections[0].Chapter.content |= sub("DFT_VERSION_HERE"; "'$DFT_VERSION'")' diff --git a/manual/src/introduction.md b/manual/src/introduction.md index 9003e4f25..cfd4f2362 100644 --- a/manual/src/introduction.md +++ b/manual/src/introduction.md @@ -6,7 +6,7 @@ Difftastic is a diff tool that understands syntax. It supports [over Difftastic is open source software (MIT license) and [available on GitHub](https://github.com/wilfred/difftastic). -This manual tracks the bleeding edge version of difftastic. The +This copy of the manual describes version DFT_VERSION_HERE. The [changelog](https://github.com/Wilfred/difftastic/blob/master/CHANGELOG.md) records which features and bug fixes are in each version.