diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 13:50:40 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 13:50:40 +0000 |
| commit | 42bea6ea126057e7b7db4256e34dd060d34b449c (patch) | |
| tree | d3384c49cf3df452b0f67d24ea92b69d43110767 | |
| parent | docs/internals/extensions rename (diff) | |
| download | alive-42bea6ea126057e7b7db4256e34dd060d34b449c.tar.gz alive-42bea6ea126057e7b7db4256e34dd060d34b449c.zip | |
docs: automatic release linking
| -rw-r--r-- | core/version.moon | 10 | ||||
| -rw-r--r-- | docs/guide.md | 6 | ||||
| -rw-r--r-- | docs/index.md | 3 | ||||
| -rwxr-xr-x | extra/git-version.sh | 14 | ||||
| -rw-r--r-- | extra/layout.moon | 8 |
5 files changed, 19 insertions, 22 deletions
diff --git a/core/version.moon b/core/version.moon index 5def7eb..144f4ac 100644 --- a/core/version.moon +++ b/core/version.moon @@ -6,14 +6,12 @@ --- exports -- @table exports -- @tfield string tag the last versions git tag --- @tfield string rev_short the short git revision hash --- @tfield string rev_long the full git revision hash --- @tfield string repo the git repo URL -- @tfield string web the repo web URL +-- @tfield string repo the git repo URL +-- @tfield string release the web URL of this release { tag: "v0.1-rc1" - rev_short: "22e3ba0" - rev_long: "22e3ba039d18f376cd98dfdc3271293ca33d4b14" + web: "https://github.com/s-ol/alivecoding" repo: "https://github.com/s-ol/alivecoding.git" - web: "https://github.com/s-ol/alivecoding/releases/tag/v0.1-rc1" + release: "https://github.com/s-ol/alivecoding/releases/tag/v0.1-rc1" } diff --git a/docs/guide.md b/docs/guide.md index 8ca023c..4f3b75b 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -59,7 +59,7 @@ be a note marking the parts of the guide where specific dependencies are required. After installing the dependencies, you can download the `alive` source code -from the [releases page][release], or clone the [git repository][git]: +from the [releases page][:*release*:], or clone the [git repository][:*web*:]: $ git clone https://github.com/s-ol/alivecoding.git @@ -77,7 +77,7 @@ You can stop it by pressing `^C` (control-C). ### windows For Windows, a binary package is available from the latest -[github release][release]. It includes not only the `alive` source code, but +[github release][:*release*:]. It includes not only the `alive` source code, but also a compiled version of Lua 5.3 as well as Luarocks and all of `alive`'s dependencies. @@ -542,10 +542,8 @@ them. [pilot]: https://github.com/hundredrabbits/Pilot [homebrew]: https://brew.sh [luarocks]: https://github.com/luarocks/luarocks/#installing -[git]: https://github.com/s-ol/alivecoding [reference]: reference/ [clojure-style]: https://github.com/bbatsov/clojure-style-guide [pd]: http://puredata.info/ [max]: https://cycling74.com/products/max [vvvv]: https://vvvv.org/ -[release]: https://github.com/s-ol/alivecoding/releases diff --git a/docs/index.md b/docs/index.md index 167642d..df7b877 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,7 +16,7 @@ system seamlessly, without resetting any part of your program (unless you want it to). `alive` will is free and open source software. The code is currently being -hosted [on github][repo], although no license has been [chosen yet][license]. +hosted [on github][:*web*:], although no license has been [chosen yet][license]. If you want to learn more or try out `alivecoding` yourself, the [getting started][guide] page is a good place to start. On the other hand, if @@ -26,5 +26,4 @@ you can find more in-depth information on these topics in the [rationale]: https://s-ol.nu/alivecoding [guide]: guide.html -[repo]: https://github.com/s-ol/alivecoding/ [license]: https://github.com/s-ol/alivecoding/issues/11 diff --git a/extra/git-version.sh b/extra/git-version.sh index 6530f43..7712b09 100755 --- a/extra/git-version.sh +++ b/extra/git-version.sh @@ -1,8 +1,8 @@ #!/bin/sh TAG=`git describe --abbrev=0 HEAD` -REV_SHORT=`git rev-parse --short HEAD` -REV_LONG=`git rev-parse HEAD` +# REV_SHORT=`git rev-parse --short HEAD` +# REV_LONG=`git rev-parse HEAD` cat <<EOF ---- @@ -13,15 +13,13 @@ cat <<EOF --- exports -- @table exports -- @tfield string tag the last versions git tag --- @tfield string rev_short the short git revision hash --- @tfield string rev_long the full git revision hash --- @tfield string repo the git repo URL -- @tfield string web the repo web URL +-- @tfield string repo the git repo URL +-- @tfield string release the web URL of this release { tag: "${TAG}" - rev_short: "${REV_SHORT}" - rev_long: "${REV_LONG}" + web: "https://github.com/s-ol/alivecoding" repo: "https://github.com/s-ol/alivecoding.git" - web: "https://github.com/s-ol/alivecoding/releases/tag/${TAG}" + release: "https://github.com/s-ol/alivecoding/releases/tag/${TAG}" } EOF diff --git a/extra/layout.moon b/extra/layout.moon index 11ccc7f..e64b736 100644 --- a/extra/layout.moon +++ b/extra/layout.moon @@ -59,6 +59,10 @@ abs = (page) -> -- entry is one of -- builtin-name; mod.name/name; mod.name link = (ref) -> + return version.web if ref == '*web*' + return version.repo if ref == '*repo*' + return version.release if ref == '*release*' + mod, sym = ref\match '^(.+)/(.*)$' abs "reference/#{mod or 'index'}.html##{sym or ref}" @@ -100,7 +104,7 @@ layout = (opts) -> span { b 'alive' ' ' - a (code version.tag), href: version.web + a (code version.tag), href: version.release ' documentation' } div class: 'grow' @@ -116,7 +120,7 @@ layout = (opts) -> "alive documentation" foot = footer div { 'alive ' - a (code version.tag), href: version.web + a (code version.tag), href: version.release ', generated ' os.date '!%Y-%m-%d %T' } |
