Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Stream Server Project
Stream Server
Commits
102525ba
Commit
102525ba
authored
Nov 03, 2019
by
Simon Kirsten
Browse files
Using pymdown-env include $VERSION in docs
parent
96ebb537
Changes
6
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci-docs.yml
View file @
102525ba
...
...
@@ -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
...
...
.gitlab-ci-pages.yml
View file @
102525ba
...
...
@@ -5,7 +5,7 @@ pages:
script
:
-
mv site public
# rename mkdocs output to public
-
mv bin
aries
public/
# move server binaries to public/
-
mv bin public/
# move server binaries to public/
artifacts
:
paths
:
...
...
.gitlab-ci-server.yml
View file @
102525ba
...
...
@@ -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 bin
aries
/linux-x86/stream-server ./cmd/stream-server
-
env GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin
aries
/linux-x86_64/stream-server ./cmd/stream-server
-
env GOOS=linux GOARCH=arm go build -ldflags "$LDFLAGS" -o bin
aries
/linux-arm/stream-server ./cmd/stream-server
-
env GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o bin
aries
/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 bin
aries
/windows-x86/stream-server.exe ./cmd/stream-server
-
env GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin
aries
/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 bin
aries
directory to deploy stage
-
bin
aries
/
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
.gitlab-ci.yml
View file @
102525ba
...
...
@@ -22,5 +22,3 @@ version:
# We don't really need to keep old builds. We can always just rebuild them
expire_in
:
1d
docs/download-and-run.md
View file @
102525ba
...
...
@@ -2,20 +2,18 @@
## Download
Version
`
--8<-- "version"
`
Version
`~~~${VERSION}~~~`
OS | CPU Platform | Download
--------------- | ------------- | ----------------------------------------------------------------------
Windows | 64 bit |
[
stream-server.exe
](
../bin
aries
/windows-x86_64/stream-server.exe
)
| 32 bit |
[
stream-server.exe
](
../bin
aries
/windows-x86/stream-server.exe
)
Linux | 64 bit |
[
stream-server
](
../bin
aries
/linux-x86_64/stream-server
)
| 32 bit |
[
stream-server
](
../bin
aries
/linux-x86/stream-server
)
| ARM64 |
[
stream-server
](
../bin
aries
/linux-arm64/stream-server
)
| ARM32 |
[
stream-server
](
../bin
aries
/linux-arm/stream-server
)
Darwin (macOS) | 64 bit |
[
stream-server
](
../bin
aries
/darwin-x86_64/stream-server
)
| 32 bit |
[
stream-server
](
../bin
aries
/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
)
.
...
...
mkdocs.yml
View file @
102525ba
...
...
@@ -57,6 +57,7 @@ markdown_extensions:
-
pymdownx.tasklist
:
custom_checkbox
:
true
-
pymdownx.tilde
-
pymdown_env
# Page tree
nav
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment