Skip to content

Commit

Permalink
docs: Add pretty download URLs
Browse files Browse the repository at this point in the history
This gives nicer download URLs for OPA binaries via:

https://openpolicyagent.org/downloads/<version>/<binary>

Under the hood we just use Netlify to rewrite the url to the normal
github and s3 locations.

With this you can also use:

https://openpolicyagent.org/downloads/edge/<binary>

and

https://openpolicyagent.org/downloads/latest/<binary>

For quick links to the current master and latest release binaries.

Fixes: open-policy-agent#1771
Signed-off-by: Patrick East <east.patrick@gmail.com>
  • Loading branch information
patrick-east committed Sep 19, 2019
1 parent 96b2bfc commit a64cef4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@ To get started download an OPA binary for your platform from GitHub releases:
On macOS (64-bit):

```shell
curl -L -o opa https://github.com/open-policy-agent/opa/releases/download/{{< current_version >}}/opa_darwin_amd64
curl -L -o opa https://openpolicyagent.org/downloads/{{< current_version >}}/opa_darwin_amd64
```

On Linux (64-bit):

```shell
curl -L -o opa https://github.com/open-policy-agent/opa/releases/download/{{< current_version >}}/opa_linux_amd64
curl -L -o opa https://openpolicyagent.org/downloads/{{< current_version >}}/opa_linux_amd64
```

> Windows users can obtain the OPA executable from [GitHub
Expand Down
5 changes: 5 additions & 0 deletions docs/website/layouts/index.redirects
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@
# Legacy git book redirects
/docs/{{ . }}.html /docs/latest/{{ . }}
{{- end }}

# Download URLs
/downloads/edge/* https://opa-releases.s3.amazonaws.com/edge/:splat 200
/downloads/latest/* https://github.com/open-policy-agent/opa/releases/download/{{ $latest }}/:splat 200
/downloads/* https://github.com/open-policy-agent/opa/releases/download/:splat 200

0 comments on commit a64cef4

Please sign in to comment.