diff --git a/.gitlab-ci-docs.yml b/.gitlab-ci-docs.yml index 9d69da16baa52460ea4fbaae54d6c92e36888491..f9b4cca1ce9c70002393c1fdef901c9e07d720c6 100644 --- a/.gitlab-ci-docs.yml +++ b/.gitlab-ci-docs.yml @@ -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 diff --git a/.gitlab-ci-pages.yml b/.gitlab-ci-pages.yml index 1c271bd16bf3ae2e07c869ce6ac3716f6d0b7bfa..effa39989f2dd4cb6be18ad860c3ef182245994e 100644 --- a/.gitlab-ci-pages.yml +++ b/.gitlab-ci-pages.yml @@ -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: diff --git a/.gitlab-ci-server.yml b/.gitlab-ci-server.yml index 77a4ef95b26c1926c3125625f86d4d51802f2232..bf475be9687c9b51edd49e60de0a0e9ab539c52e 100644 --- a/.gitlab-ci-server.yml +++ b/.gitlab-ci-server.yml @@ -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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a89594d27e2e8bb99b2884af2159d63d3c1e40f6..69bf85223a6a7e66cee041125c9ae90dfc6b0820 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,5 +22,3 @@ version: # We don't really need to keep old builds. We can always just rebuild them expire_in: 1d - - diff --git a/docs/download-and-run.md b/docs/download-and-run.md index e78b6462686bb89ad4632b31f65870e93bb8a3c2..e6c14cca815111f5c038effa0e4c593531884ca5 100644 --- a/docs/download-and-run.md +++ b/docs/download-and-run.md @@ -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) - | 32 bit | [stream-server.exe](../binaries/windows-x86/stream-server.exe) -Linux | 64 bit | [stream-server](../binaries/linux-x86_64/stream-server) - | 32 bit | [stream-server](../binaries/linux-x86/stream-server) - | ARM64 | [stream-server](../binaries/linux-arm64/stream-server) - | ARM32 | [stream-server](../binaries/linux-arm/stream-server) -Darwin (macOS) | 64 bit | [stream-server](../binaries/darwin-x86_64/stream-server) - | 32 bit | [stream-server](../binaries/darwin-x86/stream-server) +Windows | 64 bit | [stream-server.exe](../bin/~~~${VERSION}~~~/windows-x86_64/stream-server.exe) + | 32 bit | [stream-server.exe](../bin/~~~${VERSION}~~~/windows-x86/stream-server.exe) +Linux | 64 bit | [stream-server](../bin/~~~${VERSION}~~~/linux-x86_64/stream-server) + | 32 bit | [stream-server](../bin/~~~${VERSION}~~~/linux-x86/stream-server) + | ARM64 | [stream-server](../bin/~~~${VERSION}~~~/linux-arm64/stream-server) + | ARM32 | [stream-server](../bin/~~~${VERSION}~~~/linux-arm/stream-server) +Darwin (macOS) | 64 bit | [stream-server](../bin/~~~${VERSION}~~~/darwin-x86_64/stream-server) + | 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). diff --git a/mkdocs.yml b/mkdocs.yml index 570b6dd94f9dc34509b2c894d291484cdd0a1151..c7c0c077859462840a092a026365a5e79878dc4b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -57,6 +57,7 @@ markdown_extensions: - pymdownx.tasklist: custom_checkbox: true - pymdownx.tilde + - pymdown_env # Page tree nav: