Commit 102525ba authored by Simon Kirsten's avatar Simon Kirsten
Browse files

Using pymdown-env include $VERSION in docs

parent 96ebb537
......@@ -6,10 +6,15 @@ docs:
before_script:
# TODO: we should consider also version locking these packages:
# + everything will work in the future
# - we wont see any future improvements by mkdocs or mkdocs-material
# ++ everything will work in the future
# -- we won't see any future improvements of the mkdocs and mkdocs-material packages
- pip install mkdocs
- pip install mkdocs-material
# This is my own extension that we use to insert the $VERSION env variable into the documentation
- pip install pymdown-env
# load version from prep stage
- export VERSION=$(cat version)
script:
- mkdocs build
......
......@@ -5,7 +5,7 @@ pages:
script:
- mv site public # rename mkdocs output to public
- mv binaries public/ # move server binaries to public/
- mv bin public/ # move server binaries to public/
artifacts:
paths:
......
......@@ -6,27 +6,30 @@ server:
before_script:
- go mod download
# TWITCH_CLIENT_ID is supplied via the GitLab CI/CD environment variables. This way only project owners can see the private key
- export LDFLAGS="-s -X stream-server/internal/server.defaultTwitchClientID=$TWITCH_CLIENT_ID -X stream-server/internal/server.Version=$(cat version)"
# install packr2 binary
- go get -u github.com/gobuffalo/packr/v2/packr2
- pushd internal/server/; packr2; popd
# load version from prep stage
- export VERSION=$(cat version)
# TWITCH_CLIENT_ID is supplied via the GitLab CI/CD environment variables. This way only project owners can see the private key
- export LDFLAGS="-s -X stream-server/internal/server.defaultTwitchClientID=$TWITCH_CLIENT_ID -X stream-server/internal/server.Version=$VERSION"
script:
- env GOOS=darwin GOARCH=386 go build -ldflags "$LDFLAGS" -o binaries/darwin-x86/stream-server ./cmd/stream-server
- env GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o binaries/darwin-x86_64/stream-server ./cmd/stream-server
- pushd internal/server/; packr2; popd
- env GOOS=darwin GOARCH=386 go build -ldflags "$LDFLAGS" -o bin/$VERSION/darwin-x86/stream-server ./cmd/stream-server
- env GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/$VERSION/darwin-x86_64/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=386 go build -ldflags "$LDFLAGS" -o binaries/linux-x86/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o binaries/linux-x86_64/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=arm go build -ldflags "$LDFLAGS" -o binaries/linux-arm/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o binaries/linux-arm64/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=386 go build -ldflags "$LDFLAGS" -o bin/$VERSION/linux-x86/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/$VERSION/linux-x86_64/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=arm go build -ldflags "$LDFLAGS" -o bin/$VERSION/linux-arm/stream-server ./cmd/stream-server
- env GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o bin/$VERSION/linux-arm64/stream-server ./cmd/stream-server
- env GOOS=windows GOARCH=386 go build -ldflags "$LDFLAGS" -o binaries/windows-x86/stream-server.exe ./cmd/stream-server
- env GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o binaries/windows-x86_64/stream-server.exe ./cmd/stream-server
- env GOOS=windows GOARCH=386 go build -ldflags "$LDFLAGS" -o bin/$VERSION/windows-x86/stream-server.exe ./cmd/stream-server
- env GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/$VERSION/windows-x86_64/stream-server.exe ./cmd/stream-server
artifacts:
paths: # pass binaries directory to deploy stage
- binaries/
paths: # pass bin directory to deploy stage
- bin/
# We don't really need to keep old builds. We can always just rebuild them
expire_in: 1d
......@@ -22,5 +22,3 @@ version:
# We don't really need to keep old builds. We can always just rebuild them
expire_in: 1d
......@@ -2,20 +2,18 @@
## Download
Version `
--8<-- "version"
`
Version `~~~${VERSION}~~~`
OS | CPU Platform | Download
--------------- | ------------- | ----------------------------------------------------------------------
Windows | 64 bit | [stream-server.exe](../binaries/windows-x86_64/stream-server.exe)
&nbsp; | 32 bit | [stream-server.exe](../binaries/windows-x86/stream-server.exe)
Linux | 64 bit | [stream-server](../binaries/linux-x86_64/stream-server)
&nbsp; | 32 bit | [stream-server](../binaries/linux-x86/stream-server)
&nbsp; | ARM64 | [stream-server](../binaries/linux-arm64/stream-server)
&nbsp; | ARM32 | [stream-server](../binaries/linux-arm/stream-server)
Darwin (macOS) | 64 bit | [stream-server](../binaries/darwin-x86_64/stream-server)
&nbsp; | 32 bit | [stream-server](../binaries/darwin-x86/stream-server)
Windows | 64 bit | [stream-server.exe](../bin/~~~${VERSION}~~~/windows-x86_64/stream-server.exe)
&nbsp; | 32 bit | [stream-server.exe](../bin/~~~${VERSION}~~~/windows-x86/stream-server.exe)
Linux | 64 bit | [stream-server](../bin/~~~${VERSION}~~~/linux-x86_64/stream-server)
&nbsp; | 32 bit | [stream-server](../bin/~~~${VERSION}~~~/linux-x86/stream-server)
&nbsp; | ARM64 | [stream-server](../bin/~~~${VERSION}~~~/linux-arm64/stream-server)
&nbsp; | ARM32 | [stream-server](../bin/~~~${VERSION}~~~/linux-arm/stream-server)
Darwin (macOS) | 64 bit | [stream-server](../bin/~~~${VERSION}~~~/darwin-x86_64/stream-server)
&nbsp; | 32 bit | [stream-server](../bin/~~~${VERSION}~~~/darwin-x86/stream-server)
??? expert info
If you do not wish to use a precompiled executable you can [compile it yourself](../about/contributing/#server).
......
......@@ -57,6 +57,7 @@ markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
- pymdown_env
# Page tree
nav:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment